Hi all,
I'm having a look at the JarArchiver of the plexus-archiver project as
used by maven-jar-plugin.
This archiver does some MANIFEST and index stuff already, so it kind of
makes sense to add the module-descriptor logic here as well.
That will make it reusable as mentioned by Olivier and it'll be easy to
use by the maven-jar-plugin.
thanks,
Robert
On Tue, 22 Aug 2017 19:17:04 +0200, Robert Scholte <[email protected]>
wrote:
Hi,
The JDK 9 jar packager comes with 2 extra options: main-class and
module-version.
The first one is used in case of an executable modular jar, the latter
is just for display/analysis to show which version of a specific module
is used.
To support these 2 values, the module-info.class must be adjusted (yes,
the bytecode!).
It is not that hard to support this as well with a little help from ASM,
but the question is: which plugin should do this: maven-jar-plugin or
maven-shade-plugin?
If you consider this kind of information to be part of the packaging
process, maven-jar-plugin seems to be the best fit.
However, if you consider this as a resource transformation, then
maven-shade-plugin seems better.
Personally I think packaging should be quite a stupid action: making a
jar from a set of files. And it should be very reliable, since it is
part of the lifecycle of the most used packaging type. Of course you can
control this when exposed as parameters...
Or should these extra (basic?) features require an extra setup of a
maven-plugin so all transformations are done by one plugin only.
WDYT?
Robert
---------------------------------------------------------------------
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]