无法使用maven依赖项构建项目:xalan serialzer问题

时间:2017-03-30 10:48:59

标签: maven

无法在maven中解决以下问题。我不知道以下是什么错误:

运行命令时无法构建项目: mvn clean install -DskipTests

Dependency convergence error for xalan:serializer:2.7.1 paths to dependency are:

+-com.org:org-fixtures:1.2.0-SNAPSHOT
  +-com.org:org-engine:4.1-SNAPSHOT
    +-xalan:serializer:2.7.1
and
+-com.org:org-fixtures:1.2.0-SNAPSHOT
  +-com.pack:-seleniumcore:4.1-SNAPSHOT
    +-org.seleniumhq.selenium:selenium-java:2.21.0
      +-org.seleniumhq.selenium:selenium-htmlunit-driver:2.21.0
        +-net.sourceforge.htmlunit:htmlunit:2.9
          +-xalan:xalan:2.7.2
            +-xalan:serializer:2.7.2

[WARNING] Rule 0: org.apache.maven.plugins.enforcer.DependencyConvergence failed
 with message:
Failed while enforcing releasability the error(s) are [
Dependency convergence error for xalan:serializer:2.7.1 paths to dependency are:

+-com.org:org-fixtures:1.2.0-SNAPSHOT
  +-com.org:org-engine:4.1-SNAPSHOT
    +-xalan:serializer:2.7.1
and
+-com.org:org-fixtures:1.2.0-SNAPSHOT
  +-com.org:org-seleniumcore:4.1-SNAPSHOT
    +-org.seleniumhq.selenium:selenium-java:2.21.0
      +-org.seleniumhq.selenium:selenium-htmlunit-driver:2.21.0
        +-net.sourceforge.htmlunit:htmlunit:2.9
          +-xalan:xalan:2.7.2
            +-xalan:serializer:2.7.2

请帮助!!

1 个答案:

答案 0 :(得分:0)

您需要排除其中一个xalan依赖项,可能是较旧的依赖项:

<dependency>
  <groupId>com.org</groupId>
  <artifactId>org-engine</artifactId>
  <version>4.1-SNAPSHOT</version>
  <exclusions>
    <exclusion>
      <groupId>xlan</groupId>
      <artifactId>serializer</artifactId>
    </exclusion>
  </exclusions>
</dependency>