0

I am encountering a problem with the maven-enforcer-plugin. It is complaining with the following (simplified) output:

[WARNING] Rule 0: org.apache.maven.plugins.enforcer.DependencyConvergence failed with message:
Failed while enforcing releasability the error(s) are [
Dependency convergence error for com.company.project:interfaces:1.0.4 paths to dependency are:
+-com.company.project:product:1.0.14-SNAPSHOT
  +-com.company.project:some_part_A:1.0.0
    +-com.company.project:interfaces:1.0.4
and
+-com.company.project:product:1.0.14-SNAPSHOT
  +-com.company.project:some_part_B:1.0.0
    +-com.company.project:some_sub_part_BB:1.1.0
      +-com.company.project:interfaces:1.0.4
and
+-com.company.project:product:1.0.14-SNAPSHOT
  +-com.company.project:interfaces:1.0.6

The problem is with some_sub_part_BB:1.1.0. According to the plugin, this part has a dependency on version 1.0.4 of the interfaces. But this is not possible: version 1.0.0 of some_sub_part_BB used interfaces version 1.0.3, and version 1.1.0 of some_sub_part_BB went directly to using interfaces version 1.0.6. I do not have any artifacts of some_sub_part_BB that uses version 1.0.4.

I guess I'm looking at some bug of the plugin, but I would like to debug this issue to make sure what is going wrong. Is this an issue anyone has encountered before, or can someone provide me any pointers on how to debug this problem? (I am fairly new to Maven, and aside from checking all the pom.xml files I have no idea where to look further).


Side note: The idea is (was) that the interface version to be used is specified on the project level POM, so that all (sub-) parts agree on which interface to use. However, as you can see, the different parts also specify which interface they use, which I don't think is the correct way of doing this. I haven't figured out how to fix this (yet).

4

1 回答 1

0

事实证明这不是错误:在 pom.xml 文件中,您可以否决 部分中的工件版本dependencyManagement。就我而言,有人强制执行了 1.0.4 版的接口。执行器插件没有显示这一点;只有在使用详细标志生成依赖关系树后,它才变得对我来说很明显,即mvn dependency:tree -Dverbose.

于 2014-04-28T11:36:06.670 回答