Cannot use dependency jboss-javaee-6.0 in my Maven project

江枫思渺然 提交于 2019-12-05 22:03:46

This is caused by a bug in Xalan POM file. The following workaround fixed the problem for me:

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.jboss.spec</groupId>
            <artifactId>jboss-javaee-6.0</artifactId>
            <version>3.0.2.Final</version>
            <type>pom</type>
            <scope>provided</scope>
        </dependency>
        <!-- Required by jboss-javaee-6.0:3.0.2.Final (https://issues.jboss.org/browse/JBBUILD-708) --> 
        <dependency>
            <groupId>xalan</groupId>
            <artifactId>xalan</artifactId>
            <version>2.7.1</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>
</dependencyManagement>

The given dependency for jboss-javaee-6.0 is available from Maven Central so there is no need to give a separate repository.

Based on the error message you need to delete a particular location from your location maven repository (usually in $HOME/.m2/repository) in this case the folder org/jboss/. Afterwards you need to rebuild your project.

This worked for me:

<dependency>
    <groupId>org.jboss.spec</groupId>
    <artifactId>jboss-javaee-all-6.0</artifactId>
    <version>3.0.2.Final</version>
    <scope>provided</scope>
</dependency>

But I see here that something like the following may also work:

<dependency>    
    <groupId>org.jboss.spec</groupId>
    <artifactId>jboss-javaee-web-6.0</artifactId>
    <version>2.0.0.Final</version>
    <type>pom</type>
    <scope>import</scope>    
</dependency>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!