maven dependency tree compile issue in xml-apis

筅森魡賤 提交于 2021-01-27 06:31:57

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!