maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vincent <vincent...@gmail.com>
Subject shade plugin: attached artifact and dependency reduced pom
Date Fri, 26 Jul 2013 20:57:29 GMT
Hi,

I would like to deploy two artifacts of my project:
- A non-shaded version with declared (transitive) dependencies
- A shaded version with shaded/relocated dependencies (and a
"dependency-reduced" pom)

Currently, simply configuring maven-shade-plugin with:

doesn't work. Indeed, I clearly get an artifact with "shaded" classifier,
but the pom hasn't been "dependency reduced" and still contains the
dependencies that have been shaded/relocated. 
So its interest is completely lost as when another project will depend on my
shaded artifact, it will still get/retrieve the dependencies (that are now
completely useless btw) by transitivity.
 
As I guess shading feature is mainly used to avoid version conflicts in
dependencies (got by transitivity), I don't really understand how
/<shadedArtifactAttached>true</shadedArtifactAttached>/ can be effectively
used then...
(Unless we must always manually and explicitely exclude shaded dependencies
when depending on a shaded attached artifact ?)

Still, my comprehension is that for a given groupId/artifactId/version, only
one pom must exist (whatever the classifier, if any). Therefore, I don't put
too much hope in getting two distinct poms (one with dependencies and one
without) for
1) myGroupId/myArtifactId/myVersion
2) myGroupId/myArtifactId/myVersion/myClassifier
(and again, I still don't understand the purpose of
/<shadedArtifactAttached>/ option then)

So the only option to achieve my goal (provide two versions of my project, a
shaded and a non-shaded one) is probably to define a distinct artifactId
(myArtifactId-shaded) for my shaded artifact.

But what is the correct way to do this (and without duplicating my whole
project) ?

Any help would be gladly appreciated.

Thanks in advance.

Kind regards,
Vincent






--
View this message in context: http://maven.40175.n5.nabble.com/shade-plugin-attached-artifact-and-dependency-reduced-pom-tp5765599.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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


Mime
View raw message