No way to set the directory mode for the base directory nor any implicitly created directory for zip assemblies ---------------------------------------------------------------------------------------------------------------
Key: MASSEMBLY-494 URL: http://jira.codehaus.org/browse/MASSEMBLY-494 Project: Maven 2.x Assembly Plugin Issue Type: Bug Affects Versions: 2.2-beta-5 Environment: Debian GNU/Linux Reporter: Arnaud de Bossoreille Attachments: assembly-test.zip A sample maven project is attached to reproduce everything. I am trying to generate a zip file with correct permissions (i.e. directories not writable by everyone which I would say should not be too difficult). If you run `mvn assembly:assembly` as is, you will have: drwxrwxrwx ... assembly-test-1.0.0/ drwxrwxrwx ... assembly-test-1.0.0/bin/ -rw-r--r-- ... assembly-test-1.0.0/bin/assembly-test-1.0.0.jar -rw-r--r-- ... assembly-test-1.0.0/bin/commons-lang-2.4.jar drwxr-xr-x ... assembly-test-1.0.0/copyofsubdir/ -rw-r--r-- ... assembly-test-1.0.0/copyofsubdir/file I found no way to set the first two directories permissions. If you add the two directoryMode tags, you will have: drwxrwxrwx ... assembly-test-1.0.0/ drwxrwxrwx ... assembly-test-1.0.0/bin/ -rw-r--r-- ... assembly-test-1.0.0/bin/assembly-test-1.0.0.jar -rw-r--r-- ... assembly-test-1.0.0/bin/commons-lang-2.4.jar drwxr-xr-x ... assembly-test-1.0.0/copyofsubdir/ -rwxrwxrwx ... assembly-test-1.0.0/copyofsubdir/file* ... which is pretty much what I did NOT expect (a cut'n paste issue in the code?). If you add both directoryMode and fileMode, you will have the same results as the first iteration (see above). Unfortunately I still cannot change the permissions of: - the base directory (assembly-test-1.0.0) - any directory that is not present on the file system (bin) I looked a bit at the code and, as far as I can see, it may be linked to the plexus zip archiver (although it may not be responsible for the bug) which automatically adds parent directories but most probably with incorrect permissions due to bad configuration. I did not test with other assembly formats. PS: yes I can do a simple tarball, and I will probably do that while waiting for a patch. But I think it is important that you are aware of something which may annoy more than one single user in the world. Regards. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira