[ https://jira.codehaus.org/browse/MDEP-109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=319856#comment-319856 ]
Leonid Ilyevsky commented on MDEP-109: -------------------------------------- This problem is still there. More specifically, when unpacking tar.gz on linux, and the files have specific permissions for the group in the archive, they are incorrect after the unpack. I believe, the reason is that java.io.File class does not support Posix style permissions, and obviously this is what is used in the dependency plugin. There are two ways of fixing it. First way is to use java.nio.file.attribute package that supports Posix permissions, but this is available only since Java 7, and so this fix will not work with Java 6. I personally would prefer this solution; we all will start using Java 7 anyway at some point. Another way is to call tar utility from inside the plugin, instead of pure clean Java solution. > Dependency plugin looses file permissions when unpacking or copying artifact > items > ---------------------------------------------------------------------------------- > > Key: MDEP-109 > URL: https://jira.codehaus.org/browse/MDEP-109 > Project: Maven 2.x Dependency Plugin > Issue Type: Bug > Components: copy, copy-dependencies, unpack, unpack-dependencies > Affects Versions: 2.0-alpha-4 > Reporter: Vincent Massol > > I have to add the following ugly config in my pom.xml to overcome this: > {code} > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-antrun-plugin</artifactId> > <executions> > <execution> > <phase>prepare-package</phase> > <goals> > <goal>run</goal> > </goals> > <configuration> > <tasks> > <!-- Dependency plugin discards file permissions so we need > to set them back manually --> > <chmod > file="${project.build.directory}/dependency/bin/windres" perm="ugo+rx"/> > <chmod file="${project.build.directory}/dependency/bin/ld" > perm="ugo+rx"/> > ... > {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira