Maven: dependency appears in efficient pom, but not in dependency tree

Work on a multi-module project.

GrandParent
        \
         Parent
             \
             Child

GrandParenthas a rogue_1module in the section <dependencyManagement>as provided !

Parent DOES NOT have rogue_1it pom.xmlat all.

Child It does NOT have rogue_1a direct relationship in its own right pom.xml.

However, it does include several other projects, some of which may include rogue_1. (at least one works from rogue_1)

To be safe, in the ALL dependencies, ChildI added exceptions 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.ersobrings resistance.rogue_1)

: rogue_1

mvn help:effective-pom

( !)

ouctome

mvn dependency:tree

?

+4
2

mvn help:effective-pom

- , , POM (grand/+ parent) POM, . , rogue_1 XML, pom, , grandparent pom dependencyManagement . .

mvn dependency:tree

, , . , , , .

, rogue_1 child .

+1

, , , ( - ). , , <profile/>, .

0

Source: https://habr.com/ru/post/1671725/


All Articles