desruisseaux commented on issue #567: URL: https://github.com/apache/maven-jar-plugin/issues/567#issuecomment-5130833220
If #508 is accepted (after release of Maven 4.0.0-rc-6, because 508 depends on that release), the JAR plugin would no longer use Plexus Archiver but would instead use the standard `jar` tool available by `java.util.spi.ToolProvider`. This is desirable for increasing the chances to create valid JAR files. For example, by creating a multi-release JAR file with `jar --release <version>` instead of writing ourselves entries in the `META-INF/versions/` directory, we give to `jar` a chance to verify the API compatibility between versions. I don't think that we can control POSIX permissions when using the `jar` tool. This restriction may actually be okay, because JAR files are rarely intended to be unzipped. What are intended to be unzipped are usually distribution files, but I would argue that the latter should be created as ZIP files (or sometime WAR files) instead of JAR files. I would suggest that we manage the two by separated plugins: keep this plugin focussed on the creation of JAR files for consumption by `java` and similar commands, and maybe another plugin for ZIP files. The reason why I propose this separation is because if we try to handle both cases with the same plugin, it would prevent the usage of the `jar` tool. We would have to continue to mimic `jar` ourselves, and loose some `jar` functionalities (check of JAR validity, setting of Java module version, module hash codes). -- 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]
