maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Francois MAROT <francois.ma...@gmail.com>
Subject Re: Usage of dependency-reduced-pom.xml from maven-shade-plugin in a multi-module/reactor project
Date Sun, 17 Mar 2019 22:38:16 GMT
Hello Kyle,

to my knowledge your analysis is good, you are correct.
Sorry but I did not take the time to read your pom excerpt but I have been
using the shade plugin for quite some time now and concluded that shaded
artifacts must be leafs in the Maven modules tree. By "leaf" I mean no
artifact in the same Maven reactor must depend upon a shaded artifact. You
must separate the build of a shaded artifact and those depending upon it.

>From my understanding, this relates to the way Maven calculates the
dependencies: they are calculated at the beginning of the build, not at the
end or incrementally. While the shade plugin acts merely as a hack and
replaces the pom at the end of building the shaded module. It's too late  in
the process as the dependencies of artifacts depending on the shaded one
have already been calculated.

My advice would be to ensure you have 2 separated projects, not part of the
same reactor build to prevent problems or surprise for newcomers.

Regards
Francois Marot



--
Sent from: http://maven.40175.n5.nabble.com/Maven-Users-f40176.html

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message