On Wed, 23 Aug 2017 08:11:35 +0200, Plamen Totev
<[email protected]> wrote:
On Tue, Aug 22, 2017 at 11:03 PM, Robert Scholte <[email protected]>
wrote:
The maven-shade-plugin has the ability to re-package a jar and
manipulate any type of file, including class files. The best example is
relocation, where you give a set of classes a different package to
prevent potential class collisions when the original dependency
(probably with other version) is added again.
So this is a good match for the module-info.class adjustments.
Thank you for the detailed explanation. Initially I thought that if
this is not part of the jar plugin then the transformation should
happen before its execution(similar to the MANFEST.MF). Now on second
thought it also sounds logical to be done after. But still - isn't the
shade plugin supposed to be used for "uber jars" (at least its primary
purpose)? Correct me if I'm wrong, but its only target will create a
"uber jar". What if I want to set the module version but without
changing the rest of the jar? A configuration or new target will solve
this issue, but as a user of the plugin I think it would change its
purpose. And there is nothing wrong with that of course .
You can choose which artifacts should be included/excluded from the
uber-jar. By default it'll select all, which means you must do quite some
extra configuration just to set the main-class and module-version.
Another downside is that the maven-shade-plugin is probably not the plugin
one would expect to use to achieve this.
Also another important question for me. Do you think that other types
of packaging will benefit from setting the module version as well? I
mean not only now but in future as well. Some of the EE packaging
types for example.
---------------------------------------------------------------------
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]