Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug(pom): use dependencyManagement's for dependencies from parents #7493

Closed
DmitriyLewen opened this issue Sep 12, 2024 Discussed in #7475 · 0 comments · Fixed by #7497
Closed

bug(pom): use dependencyManagement's for dependencies from parents #7493

DmitriyLewen opened this issue Sep 12, 2024 Discussed in #7475 · 0 comments · Fixed by #7497
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@DmitriyLewen
Copy link
Contributor

DmitriyLewen commented Sep 12, 2024

Description

We need to use dependencyManagement's (from root or child pom) for dependencies from parents.
Take a look the following examples:

изображение

In this case we need to use dependencyManagement from scanner pom file for cn.hutool:hutool-all from parent pom file:

➜ mvn dependency:tree
[INFO] --- dependency:3.7.0:tree (default-cli) @ test-dependency-mvn ---
[INFO] org.example:test-dependency-mvn:jar:1.0-SNAPSHOT
[INFO] \- org.example:sub-module:jar:1.0-SNAPSHOT:compile
[INFO]    \- cn.hutool:hutool-all:jar:5.8.28:compile

изображение

In this case we need to use dependencyManagement from child pom file for cn.hutool:hutool-all from parent pom file (and ignore property from root pom):

➜ mvn dependency:tree
[INFO] --- dependency:3.7.0:tree (default-cli) @ test-dependency-mvn ---
[INFO] org.example:test-dependency-mvn:jar:1.0-SNAPSHOT
[INFO] \- org.example:sub-module:jar:1.0-SNAPSHOT:compile
[INFO]    \- cn.hutool:hutool-all:jar:5.8.25:compile

Discussed in #7475

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
1 participant