Question

I'm migrating my project from grails 2.2 to 2.3 and everything work fine except jaxrs plugin

My BuildConfig.groovy looks like:

...
grails.project.dependency.resolver = "maven"

grails.project.dependency.resolution = {
    plugins {
        compile ':jaxrs:0.8'
    }
}

I got this error message:

| Error Resolve error obtaining dependencies: The following artifacts could not be resolved: org.restlet.gae:org.restlet.ext.json:jar:2.0.0, org.restlet.gae:org.restlet:jar:2.0.0, org.restlet.gae:org.restlet.ext.servlet:jar:2.0.0: Could not find artifact org.restlet.gae:org.restlet.ext.json:jar:2.0.0 in grailsCentral (http://repo.grails.org/grails/plugins) (Use --stacktrace to see the full trace)
| Error Resolve error obtaining dependencies: The following artifacts could not be resolved: org.restlet.gae:org.restlet.ext.json:jar:2.0.0, org.restlet.gae:org.restlet:jar:2.0.0, org.restlet.gae:org.restlet.ext.servlet:jar:2.0.0: Could not find artifact org.restlet.gae:org.restlet.ext.json:jar:2.0.0 in grailsCentral (http://repo.grails.org/grails/plugins) (Use --stacktrace to see the full trace)
| Error Resolve error obtaining dependencies: The following artifacts could not be resolved: org.restlet.gae:org.restlet.ext.json:jar:2.0.0, org.restlet.gae:org.restlet:jar:2.0.0, org.restlet.gae:org.restlet.ext.servlet:jar:2.0.0: Could not find artifact org.restlet.gae:org.restlet.ext.json:jar:2.0.0 in grailsCentral (http://repo.grails.org/grails/plugins) (Use --stacktrace to see the full trace)
| Error The following artifacts could not be resolved: org.restlet.gae:org.restlet.ext.json:jar:2.0.0, org.restlet.gae:org.restlet:jar:2.0.0, org.restlet.gae:org.restlet.ext.servlet:jar:2.0.0: Could not find artifact org.restlet.gae:org.restlet.ext.json:jar:2.0.0 in grailsCentral (http://repo.grails.org/grails/plugins)
| Run 'grails dependency-report' for further information.

When I run the report, I got:

+--- org.grails.plugins:jaxrs:0.8
|    >>>> org.restlet.gae:org.restlet.ext.json:2.0.0
|    >>>> org.restlet.gae:org.restlet:2.0.0
|    \--- com.sun.jersey:jersey-core:1.14
|    \--- javax.ws.rs:jsr311-api:1.1.1
|    \--- com.sun.jersey:jersey-json:1.14
|    >>>> org.restlet.gae:org.restlet.ext.servlet:2.0.0
|    \--- com.sun.jersey.contribs:jersey-spring:1.14
|         \--- org.springframework:spring-core:3.0.0.RC3
|              \--- org.springframework:spring-asm:3.0.0.RC3
|              \--- commons-logging:commons-logging:1.1.1
|         \--- org.springframework:spring-beans:3.0.0.RC3
|         \--- org.springframework:spring-context:3.0.0.RC3
|         \--- org.springframework:spring-web:3.0.0.RC3
|         \--- org.springframework:spring-aop:3.0.0.RC3
|    \--- com.sun.jersey:jersey-server:1.14
|    \--- com.sun.jersey:jersey-servlet:1.14
|    \--- asm:asm:3.3
|    \--- org.spockframework:spock-grails-support:0.7-groovy-2.0
|    \--- org.grails.plugins:spock:0.7

How can I fix this ?

Was it helpful?

Solution

I found this post. There's a beta version being develop.

I've done what is suggested:

I added the mavenRepo

mavenRepo 'https://noams.artifactoryonline.com/noams/grails-jaxrs-plugin-snapshots'

And as I use the new Aether (Maven) resolver I configure the jaxrs plugin like this:

compile (':jaxrs:0.10-SNAPSHOT') {
    excludes 'spring-core', 'spring-beans', 'spring-context', 'spring-web', 'spring-aop'
}

But org.restlet.ext.json:jar:2.1.4 was still missing so I also have to add this mavenRepo:

mavenRepo 'http://maven.restlet.org'

Application cleaned! Tests Passed!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top