安装Maven项目时,出现DependencyConvergence错误

时间:2019-03-07 18:27:21

标签: java maven

[WARNING] Rule 3: org.apache.maven.plugins.enforcer.DependencyConvergence failed with message:
    Failed while enforcing releasability the error(s) are [
    Dependency convergence error for xml-apis:xml-apis:1.3.04 paths to 
    dependency are:
    +-com.print.attend: printview: 1.2-SNAPSHOT
      +-com.:string-converter:5.0
        +-org.apache.xmlgraphics:batik-transcoder:1.7
          +-org.apache.xmlgraphics:batik-bridge:1.7
            +-org.apache.xmlgraphics:batik-anim:1.7
              +-xml-apis:xml-apis:1.3.04
    and
    +-com.print.attend: printview: 1.2-SNAPSHOT
      +-com.print.processor:string-converter:5.0
        +-org.apache.xmlgraphics:batik-transcoder:1.7
          +-org.apache.xmlgraphics:batik-bridge:1.7
            +-org.apache.xmlgraphics:batik-css:1.7
              +-xml-apis:xml-apis:1.3.04
    and
    +-com.print.attend: printview: 1.2-SNAPSHOT
      +-com.print.processor:string-converter:5.0
        +-org.apache.xmlgraphics:batik-transcoder:1.7
          +-org.apache.xmlgraphics:batik-bridge:1.7
            +-org.apache.xmlgraphics:batik-ext:1.7
              +-xml-apis:xml-apis:1.3.04
     and
     +-com.print.attend: printview: 1.2-SNAPSHOT
       +-com.print.processor:string-converter:5.0
         +-org.apache.xmlgraphics:batik-transcoder:1.7
           +-org.apache.xmlgraphics:batik-bridge:1.7
             +-xml-apis:xml-apis:1.3.04
     and
     +-com.print.attend: printview: 1.2-SNAPSHOT
       +-com.print.processor:string-converter:5.0
         +-org.apache.xmlgraphics:batik-transcoder:1.7
           +-org.apache.xmlgraphics:batik-dom:1.7
             +-xml-apis:xml-apis:1.3.04
     and
     +-com.print.attend: printview: 1.2-SNAPSHOT
       +-com.print.processor:string-converter:5.0
         +-org.apache.xmlgraphics:batik-transcoder:1.7
           +-org.apache.xmlgraphics:batik-gvt:1.7
             +-xml-apis:xml-apis:1.3.04
     and
     +-com.print.attend: printview: 1.2-SNAPSHOT
       +-com.print.processor:string-converter:5.0
         +-org.apache.xmlgraphics:batik-transcoder:1.7
           +-org.apache.xmlgraphics:batik-svg-dom:1.7
             +-xml-apis:xml-apis:1.3.04
     and
     +-com.print.attend: printview: 1.2-SNAPSHOT
       +-com.print.processor:string-converter:5.0
         +-org.apache.xmlgraphics:batik-transcoder:1.7
           +-org.apache.xmlgraphics:batik-svggen:1.7
             +-xml-apis:xml-apis:1.3.04
    and
    +-com.print.attend: printview: 1.2-SNAPSHOT
      +-com.print.processor:string-converter:5.0
        +-org.apache.xmlgraphics:batik-transcoder:1.7
          +-xml-apis:xml-apis:1.3.04
    and
    +-com.print.attend: printview: 1.2-SNAPSHOT
      +-com.print.processor:string-converter:5.0
        +-com.cer.clinrpt.core:cr-core:6.0
         +-xml-apis:xml-apis:1.3.04
    and
    +-com.print.attend: printview: 1.2-SNAPSHOT
      +-com.print.processor:string-converter:5.0
        +-com.clip.editor:cr-core:6.0
          +-org.apache.xmlgraphics:batik-codec:1.7
            +-xml-apis:xml-apis:1.3.04
    and
    +-com.print.attend: printview: 1.2-SNAPSHOT
      +-com.print.processor:string-converter:5.0
        +-xml-apis:xml-apis:1.3.04
    and
    +-com.print.attend: printview: 1.2-SNAPSHOT
        +-com.print.common.procedural:common-procedural-jsap:1.0
          +-org.hibernate:hibernate-entitymanager:3.4.0.GA
            +-dom4j:dom4j:1.6.1
              +-xml-apis:xml-apis:1.0.b2

在intellij上安装Maven项目时,出现此错误。如何     解决这个问题?

1 个答案:

答案 0 :(得分:2)

DependencyConvergence规则检查在依赖关系树的不同版本中是否找到相同的依赖关系。

如果找到不同的版本,并且没有给出dependencyManagement条目,它将使构建失败。

您可以

  • 定义一个dependencyManagement条目,该条目为xml-apis设置版本。
  • 弄清楚为什么不同版本进入依赖关系树并更改依赖关系,以免发生这种情况。
  • 停用DependencyConvergence规则。