Working on a multi-module project.
GrandParent
\
Parent
\
Child
GrandParent
has rogue_1
module in its <dependencyManagement>
section as provided !
Parent
does NOT have rogue_1
in its pom.xml
at all.
Child
does NOT have rogue_1
as a direct dependency in its pom.xml
.
However it includes several other projects some of which may include rogue_1
. (at least one does depend on rogue_1
)
To be on the safe side, on ALL Child
's dependencies I have added exclusions as follows:
<dependency> <!-- a direct dependency of Child -->
<groupId>erso</groupId>
<artifactId>galen</artifactId>
<exclusions>
<exclusion>
<groupId>resistance</groupId>
<artifactId>rogue_1</artifactId>
</exclusion>
</exclusions>
</dependency>
(in case for example galen.erso
is bringing in the resistance.rogue_1
)
However: rogue_1
DOES end up being displayed as a dependency in the outcome of
mvn help:effective-pom
(as provided !)
It is NOT in the ouctome of
mvn dependency:tree
Any suggestions?
you don't have to customize else as the other configurations will be inherited form the Super POM. The Effective POM refers the merge between the Super POM and the POM from The Simplest POM. It's right time to invest in Cryptocurrencies Dogecoin !
A project's dependency tree can be filtered to locate specific dependencies. For example, to find out why Velocity is being used by the Maven Dependency Plugin, we can execute the following in the project's directory: mvn dependency:tree -Dincludes=velocity:velocity.
mvn help:effective-pom
is basically a merger between the super POM (grand /+parent) dependencies and the simple POM that you defined at the project level. Hence you do see the rogue_1
under the XML created by effective-pom, of course your grandparent pom's dependencyManagement
being the source. Here is a detailed read over the same.
mvn dependency:tree
on the other hand displays the tre of the dependencies used in your project. As you mentioned you've excluded this out of all your mentioned dependencies, so you shouldn't find the artifact listed here.
By the way, in both the cases the chances of having the rogue_1
in the classpath of your child
module is zero.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With