问题
I'm using hibernate 4.3.0 in a maven project.When I try to run mvn dependacy:tree it shows a compliation issues for xml-apis.jar in dom4j.
[INFO] | +- dom4j:dom4j:jar:1.6.1:compile
[INFO] | | - xml-apis:xml-apis:jar:1.0.b2:compile
If I exclude the xml-apis jar from hibarate-core like below, this issue get solved.
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>4.3.0.Final</version>
<exclusions>
<exclusion>
<artifactId>xml-apis</artifactId>
<groupId>xml-apis</groupId>
</exclusion>
</exclusions>
</dependency>
Is there a way to solve this without excluding the jar from hibernate-core?
来源:https://stackoverflow.com/questions/21881183/maven-dependency-tree-compile-issue-in-xml-apis