[MNG-6724] Ability to exchange dependencies
- Dominant language
- Java
- Stars
- 5.3k
- Forks
- 3.1k
- Avg merge
- 20h 40m
- Merged PRs (30d)
- 275
Description
**[Thorsten Glaser](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=mirabilos)** opened **[MNG-6724](https://issues.apache.org/jira/browse/MNG-6724?redirect=false)** and commented
Feature Request: I would like to have the explicit ability to exchange dependencies globally, such as from dependencyManagement.
Currently, I can do \ on a dependency’’s transitive dependency, then add an explicit \ to the POM of my final WAR (and possibly a test-scoped one on the JAR it’s in), but that makes the maven-dependency-plugin:3.1.1:analyze-only goal complain about a declared but unused dependency.
With the javax.* → jakarta moves (and some others, e.g. I need the com.sun.activation version of jakarta.activation instead of the Jakarta one) and multiple JAXB implementations around, this is becoming troublesome.
Therefore, I would like for Maven to allow something like this:
```java
javax.xml.bind
jaxb-api
jakarta.xml.bind
jakarta.xml.bind-api
jakarta.xml.bind
jakarta.xml.bind-api
${jaxb-api.version}
```
This would recursively replace the old JAXB-API with the new one but not add them where unnecessary, and make the maven-dependency-plugin’s checks do the right thing.
Thanks in advance for consideration!
---
No further details from [MNG-6724](https://issues.apache.org/jira/browse/MNG-6724?redirect=false)
Contributor guide
Assessment
This issue has not been assessed yet.