Hi,

On 12/20/2017 9:53 PM, Robert Scholte wrote:

Based on this message it seems worth implementing a JarToolArchiver, using the jar tool via the ToolProvider[1] I hope it can still be a org.codehaus.plexus.archiver.Archiver, otherwise I'll contact the openjdk team about the details of the specifications. I don't think we need them all, good to know the reason for the extra files.

So I did some experiments and definitely it is possible to implement it as org.codehaus.plexus.archiver.Archiver. I think it would be best to reuse JarArchiver to create the non-modular JAR file and then use the JDK jar tool to update it to modular JAR file. The downside of this approach is that it involves additional work(there is some performance penalty). The JDK jar tool updates files the same as way Plexus Archiver - creates new file, copies the old entries and adds the new ones. Do you think this is really an issue? I think for small JAR files the difference would not be noticeable.

Of course we could create the jar file directly using only the JDK jar tool. But the Plexus Archiver is quite advanced tool compared to it. If we have to implement all of its functionality using only the JDK jar tool, it would be easier to update the module descriptors using asm (IMHO).

About the ToolProvider - maybe I'm missing something but it is available only for Java 9 and does not allow the use of tool chains, does it?

Regards,
Plamen Totev

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org

Reply via email to