You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "gnodet (via GitHub)" <gi...@apache.org> on 2026/09/25 18:59:20 UTC

Re: [I] Preserve POSIX file permissions for entries added from classesDirectory [maven-jar-plugin]

gnodet commented on issue #567:
URL: https://github.com/apache/maven-jar-plugin/issues/567#issuecomment-5837972236

   I investigated this with the current  branch (4.0.0-beta-2-SNAPSHOT), which replaces Plexus Archiver with the JDK  tool (see #508).\n\n**Result: the behavior is unchanged.** The JDK  tool does not preserve POSIX file permissions either. Testing with JDK 21 and JDK 25 on Linux:\n\n\n\nInspection of the produced ZIP entries shows  for all entries, including  (which had mode  on disk). This is a known limitation of the standard  tool — it does not read or store POSIX  when creating archives.\n\n**Conclusion:** Since the  tool itself does not support this, we are not going to implement a workaround. The ZIP/JAR format does support Unix mode bits in the  field, but the JDK tool intentionally does not set them. A potential avenue would be to request this feature in the JDK ( tool), or to use a different packaging approach for artifacts that require executable permissions (e.g. a native tarball via  or ).\n\nIf the JDK  tool adds support for preserving POSIX permissions in a future rel
 ease, this plugin would benefit from it automatically.\n\nClosing as won't fix for now.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org