[GRADLE-3122] Copy spec expand() fails on files bigger than 64K Created: 02/Jul/14  Updated: 24/Jan/17  Resolved: 24/Jan/17

Status: Resolved
Project: Gradle
Affects Version/s: 2.0
Fix Version/s: None

Type: Bug
Reporter: Gradle Forums Assignee: Unassigned
Resolution: Won't Fix Votes: 0


While attempting to migrate our first project from Maven to Gradle we are running in the following issue.

Here is a simple gradle script:

task filterBigFile(type: Copy)

{ from '.' into 'build/big_file_filtered.txt' include 'big_file.txt' expand(expand_me: 'test') }

If 'big_file' is bigger than 64K, the copy task will fail with the following stacktrace: [1]https://gist.github.com/anonymous/20b...

Reproduced with Gradle 2.0 and 1.12.

Filtering with maven is working as expected.

Comment by Luke Daley [ 02/Jul/14 ]

This is fundamentally http://jira.codehaus.org/browse/GROOVY-3457

Comment by Etienne Studer [ 12/Aug/14 ]

I've looked into https://github.com/mbjarland/groovy-streaming-template-engine which might be a suitable option, but it is licensed under GNU. Also, it currently does not handle $var, but only ${var}. If those two things can be 'fixed', we should look into it again. I've contacted Matias and I've also asked him to consider creating a pull request with his contribution for the Groovy project.

Comment by Luke Daley [ 12/Aug/14 ]

I think we should push getting this “fixed” in Groovy first.

This may mean that we need to work with the Groovy folks and contribute the “fix”.

Comment by Etienne Studer [ 14/Aug/14 ]

Pull request that is ready to be merged into groovy-core has been submitted by Matias to the Groovy project.

Comment by Benjamin Muschko [ 15/Nov/16 ]

As announced on the Gradle blog we are planning to completely migrate issues from JIRA to GitHub.

We intend to prioritize issues that are actionable and impactful while working more closely with the community. Many of our JIRA issues are inactionable or irrelevant. We would like to request your help to ensure we can appropriately prioritize JIRA issues you’ve contributed to.

Please confirm that you still advocate for your JIRA issue before December 10th, 2016 by:

  • Checking that your issues contain requisite context, impact, behaviors, and examples as described in our published guidelines.
  • Leave a comment on the JIRA issue or open a new GitHub issue confirming that the above is complete.

We look forward to collaborating with you more closely on GitHub. Thank you for your contribution to Gradle!

Comment by Benjamin Muschko [ 24/Jan/17 ]

The Groovy issue https://issues.apache.org/jira/browse/GROOVY-3457 has been fixed in Groovy 2.4.0-beta-4. The latest version of Gradle uses Groovy 2.4.7. I am assuming this is fixed. Please open an issue on GitHub if it still occurs.

Generated at Wed Jun 30 12:40:35 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.