cowwoc opened a new issue, #567: URL: https://github.com/apache/maven-jar-plugin/issues/567
## Use case A project builds a JAR on Linux and later extracts that JAR on Linux as part of assembling a distributable artifact. Some resources are executable shell scripts. The extracted scripts should retain their source POSIX permissions, such as `0755`, so they can be invoked directly. ## Current behavior With Maven Jar Plugin 3.5.1 on Linux: 1. A resource file under `src/main/resources` is mode `0755`. 2. The copied file under `target/classes` remains mode `0755`. 3. After `mvn package`, the corresponding JAR entry has Unix mode `100644`. 4. Extracting the JAR on Linux produces a non-executable file. The plugin creates a `DefaultFileSet` for `classesDirectory` without resource mode attributes, so Plexus Archiver falls back to its default file mode. ## Requested behavior When creating a JAR on a POSIX filesystem, preserve the POSIX file permissions of entries added from the classes directory (or provide an opt-in configuration that does so). This would allow a JAR created on Linux and extracted on Linux to retain executable resource scripts. This is distinct from the mode of the generated JAR file itself; it concerns the Unix mode metadata of entries inside the JAR. ## Reproduction ```sh chmod 755 src/main/resources/hooks/session-start.sh mvn package zipinfo -l target/example.jar | grep session-start.sh ``` Expected entry mode: `-rwxr-xr-x` (`100755`). Actual entry mode: `-rw-r--r--` (`100644`). -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
