Closed slackfarmer closed 8 years ago
I tried adding all these dependencies in dependency.resolution block but then also its not working .
Can you please tell me where exactly I will have to add this piece of code in buildconfig.groovy
Hey - ran into the same issue.. Still new to the dependency strategies in grails and am struggling to make sense of it. Would I be better served to use a local build?
I cloned the project from github, made some dependency updates, then deployed the plugin to my local artifactory repository.
If you go the artifactory route the "publish-plugin" command is really awesome.
All you need to do is add something like this to the bottom of your BuildConfig.groovy
grails.project.repos.myRepo.url = "http://mysite.internal.some.com:4280/artifactory/simple/plugins-release-local"
grails.project.repos.myRepo.type = "maven"
grails.project.repos.myRepo.username = "yourUsername"
grails.project.repos.myRepo.password = "yourPassword"
grails.project.repos.default = "myRepo"
then run: "grails publish-plugin" from the cloned jaxrs project folder.
@abhisheksahay It should go in BuildConfig.groovy in the following spot
dependencies {
String restletVersion = '2.1.4'
String jerseyVersion = '1.18.3'
compile('com.wordnik:swagger-jaxrs_2.10:1.3.12'){
exclude 'jackson-jaxrs-json-provider'
}
compile "org.restlet.gae:org.restlet:$restletVersion"
compile("org.restlet.gae:org.restlet.ext.servlet:$restletVersion") {
excludes 'org.restlet', 'servlet-api'
}
compile("com.sun.jersey:jersey-client:$jerseyVersion")
compile("com.sun.jersey:jersey-core:$jerseyVersion") {
excludes 'jaxb-api', 'jsr311-api', 'junit', 'mail', 'org.osgi.core'
}
compile("com.sun.jersey:jersey-servlet:$jerseyVersion") {
excludes 'ant', 'commons-io', 'javax.ejb', 'javax.servlet-api', 'jsp-api', 'junit', 'osgi_R4_core',
'persistence-api', 'weld-osgi-bundle'
}
compile("com.sun.jersey:jersey-server:$jerseyVersion") {
excludes 'asm', 'commons-io', 'jaxb-api', 'jsr250-api', 'junit', 'mail', 'osgi_R4_core'
}
compile("com.sun.jersey:jersey-json:$jerseyVersion") {
excludes 'jackson-core-asl', 'jackson-jaxrs', 'jackson-mapper-asl', 'jackson-xc', 'jaxb-impl', 'jettison', 'junit', 'org.eclipse.persistence.moxy'
}
compile("com.sun.jersey.contribs:jersey-spring:$jerseyVersion") {
excludes 'jaxb-impl', 'jsr250-api', 'junit', 'servlet-api', 'testng', 'spring-core', 'spring-beans',
'spring-context', 'spring-web', 'spring-aop'
}
compile("com.sun.jersey.contribs:jersey-multipart:$jerseyVersion") {
}
compile('javax.ws.rs:jsr311-api:1.1.1') {
excludes 'junit'
}
}
This issue was moved to budjb/grails-jaxrs#20
I am experiencing two issues with this plugin. Most of it, seems to be some kind of dependency hell.
1.) When I try to demarshal custom jax annotated objects for json I am getting the following:
2.) The 0.11 version of the jaxrs plugin is not pulling it's dependencies automatically.
I have to add the following to my BuildConfig.groovy so that it can resolve the required dependencies.