Plexus Archiver is an archiver fully written in Java, so there has never
been the need to add toolchain support.
It would be very nice if this could be solved without the need of the
external jartool or using it via a ToolProvider[1].
So maybe we simply have to split it up into smaller pieces.
I think we can already make people happy by adding the version to the
module-info file, assuming all other added features are actually nice to
haves.
thanks,
Robert
[1]https://docs.oracle.com/javase/9/docs/api/java/util/spi/ToolProvider.html
On Mon, 15 Jan 2018 18:12:40 +0100, Plamen Totev
<[email protected]> wrote:
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: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]