apache / apache/maven

[MNG-5527] Dependency management import should support relocations.

Open
#6,804 4 comments 0 reactions 0 assignees View on GitHub
bug priority:major
Dominant language
Java
Stars
5.3k
Forks
3.1k
Avg merge
20h 40m
Merged PRs (30d)
275

Description

**[Matous Jobanek](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=mjobanek)** opened **[MNG-5527](https://issues.apache.org/jira/browse/MNG-5527?redirect=false)** and commented

Consider the following scenario:

```xml

4.0.0
old.groupId.bom
my-artifactId-bom
1.0
pom



new.groupId.bom
my-artifactId-bom
2.0

```

```xml

4.0.0

my.project.groupId
my-project
1.0
war




old.groupId.bom
my-artifactId-bom
1.0
pom
import


...

```

The expected result according to [1]:
During building the "my-project" it should print the WARNING with the information about the relocation and it should be automatically redirected from old.groupId.bom:my-artifactId-bom:1.0 to new.groupId.bom:my-artifactId-bom:2.0 and use dependencies from the new pom.

Actual results:
There is no WARNING and no redirection to the new pom and maven is trying to obtain dependencies from the old pom (old.groupId.bom:my-artifactId-bom:1.0).
Nevertheless, when the pom is declared as a "normal dependency" (not in the "dependencyManagement" part) it works without any problem - it prints the WARNING and redirects to the new pom, but this is not the case we are using.

[1] http://maven.apache.org/guides/mini/guide-relocation.html

---

**Remote Links:**
- [Page
](https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=67636510)
- [GitHub Pull Request #29
](https://github.com/apache/maven-integration-testing/pull/29)
- [GitHub Pull Request #147
](https://github.com/apache/maven/pull/147)
- [GitHub Pull Request #29
](https://github.com/apache/maven-integration-testing/pull/29)

0 votes, 8 watchers

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.