简体   繁体   中英

Why won't JBoss Resteasy maven dependency work?

I added

<dependency>
    <groupId>org.jboss.resteasy</groupId>
    <artifactId>resteasy-jaxrs-all</artifactId>
    <version>2.2.1.GA</version>
    <scope>provided</scope>
</dependency>

and I'm using

<repositories>
    <repository>
        <id>jboss</id>
        <url>http://repository.jboss.org/nexus/content/groups/public</url>
    </repository>
</repositories>

When I try to build, I get the following error. What am I doing wrong?

[ERROR] Failed to execute goal on project tapvox-api: Could not resolve dependencies for project com.myproject.api:myproject-api:war:1.0-SNAPSHOT: Could not find artifact org.jboss.resteasy:resteasy-jaxrs-all:jar:2.2.1.GA in jboss ( http://repository.jboss.org/nexus/content/groups/public ) -> [Help 1]

The dependency that you are trying to download does not have any jars or transitive dependencies. Since the default type is jar, then this will fail. If you put

<type>pom</type>

in your dependency, then you get the only artifact that this dependency has to offer. See pom

I guess that you are trying to fetch the wrong dependency.

You have to specify a dependency type. Change your dependency to look like this:

<dependency>
    <groupId>org.jboss.resteasy</groupId>
    <artifactId>resteasy-jaxrs-all</artifactId>
    <version>2.2.1.GA</version>
    <type>pom</type>                             <<<<<
    <scope>provided</scope>
</dependency>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM