[GRADLE-2685] Tar task follows symbolic links and duplicates files Created: 20/Feb/13  Updated: 10/Feb/17  Resolved: 10/Feb/17

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

Type: Task
Reporter: Gradle Forums Assignee: Unassigned
Resolution: Won't Fix Votes: 7


 Description   

I have a situation where I have several symbolic links to files within a directory. When I define a task using the 'Tar Type' to tar up the directory it actually follows the symlink and duplicates the file. How can override this so that the links are maintained.



 Comments   
Comment by Gradle Forums [ 20/Feb/13 ]

When asking this kind of question, please always state the OS and Gradle version.

Comment by Gradle Forums [ 20/Feb/13 ]

No problem! We are using gradle-1.0-milestone-6 on CenOS 5.7. Is there an option to tell gradle not to follow the links like the 'followsymlinks' attribute does for ant? If not, what would you suggest for a workaround?

Comment by Gradle Forums [ 20/Feb/13 ]

There is currently no such option. The usual workaround is to use the Ant task.

Comment by Gradle Forums [ 20/Feb/13 ]

Unfortunately, the ant task does not support symlinks, too. Is there any other workaround besides using native tar implementations?

Comment by Gradle Forums [ 20/Feb/13 ]

Considering that Java7 have support for symbolic links what is the prospect of resolving that matter so that it at least works with the latest version of Java?

Comment by Gradle Forums [ 20/Feb/13 ]

Internally, Gradle already has sophisticated symlink support, using NIO2 where appropriate. This story hasn't bubbled up yet, but I'll export it to JIRA so that it gets some attention.

Comment by Adam Murdoch [ 24/Feb/13 ]

We do intend to fix this, it's just a matter of priorities. Would you be interested in helping to fix this?

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 [ 10/Feb/17 ]

Thanks again for reporting this issue. We haven't heard back from you after our inquiry from November 15th. We are closing this issue now. Please create an issue on GitHub if you still feel passionate about getting it resolved.

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