0

I have a maven project which uses dependency "A" with version 2.12.6.

Then I added this project as a maven dependency "B" in pom.xml of another project.

The issue is that the transitive dependency "A" is pulled with version 2.10.3.

  • I executed the command: mvn dependency:tree with -Dincludes, and got that dependency "A" comes only from dependency "B".
  • This issue is reproduced for a lot of transitive dependencies that comes from "B".

So my question is: why maven pull the wrong version of dependency "A", and how can I solve it without exlusions and dependencyManagement solution?

Maven version is 3.3.3, Maven-Dependency-Plugin version is 2.10

  • Please show the appropriate pom files... My assumption is that your project B defines another version of the dependency or uses an other dep which defines is transitively ..without the pom files it's not possible to answer the why..... – khmarbaise Feb 09 '22 at 10:57
  • @khmarbaise I executed mvn dependency:tree also in project "B" and verified that there is a just one occurence to dependency "A". – Tzofiya Tzadok Feb 09 '22 at 11:11
  • 1
    As I wrote without the full pom files it's impossible to identify the reason.. also which version of Maven, Maven-Dependency-Plugin version etc. you are using.. ? – khmarbaise Feb 09 '22 at 11:22
  • @khmarbaise I cannot upload the full pom files due to security reasons, anyway they are very complex and contain a lot of data is not relevant to my question. Maven version is 3.3.3, Maven-Dependency-Plugin version is 2.10.. thanks for your response – Tzofiya Tzadok Feb 09 '22 at 11:33
  • First upgrade Maven versions (you are using an very old and buggy Maven versions) also very important upgrade your maven-dependency-plugin version ... as well and recheck the tree... – khmarbaise Feb 09 '22 at 11:35
  • The other version comes either from another dependency or from dependencyManagement. If you cannot publish your POM, I guess we need to close this because it is not reproducible. – J Fabian Meier Feb 09 '22 at 14:01

0 Answers0