Is there a groovyws.jar with all his dependences?

帅比萌擦擦* 提交于 2019-12-12 17:32:26

问题


I'm using Grails and want to use groovyws to call an web-service.

But my groovyws.jar (0.5.2) have MANY dependences that I can't solve.

Is there any jar with all dependences included?

Note: I tried put in BuildConfig.groovy, this

dependencies {
'org.codehaus.groovy.modules:groovyws:0.5.2'
}

but I'm getting error:

Error executing script Compile: loader constraint violation: when resolving overridden method "org.apache.xerces.jaxp.SAXParserImpl.getParser()Lorg/xml/sax/Parser;" the class loader (instance of org/codehaus/groovy/grails/cli/support/GrailsRootLoader) of the current class, org/apache/xerces/jaxp/SAXParserImpl, and its superclass loader (instance of ), have different Class objects for the type org/xml/sax/Parser used in the signature


回答1:


You can manually exclude xerces by:

dependencies {
    runtime('org.codehaus.groovy.modules:groovyws:0.5.2') {
        exclude: 'xerces'
    }
}



回答2:


GroovyWS pulls inn CXF, which again pulls in a lot of dependencies, some of them conflicting with classes already present in Java 6. You need to exclude all these dependencies if using Java 6, to avoid errors like the one you mention.

Here's my exclude list:

compile("org.codehaus.groovy.modules:groovyws:0.5.2") {
    excludes 'geronimo-servlet_2.5_spec', 'servlet-api', 'jaxb-xjc', 'jaxb-impl', 'xml-apis', 'saaj-impl', 'junit', 'slf4j-jdk14', 'xmlParserAPIs', 'jaxb-api', 'saaj-api', 'xmlbeans', 'jaxen', 'geronimo-stax-api_1.0_spec', 'geronimo-activation_1.0.2_spec', 'abdera-client', 'geronimo-activation_1.1_spec'
}

Note that on Ubuntu you need jaxb-xjc and jaxb-impl after all, don't know why.




回答3:


I found:

  • http://docs.codehaus.org/dosearchsite.action?queryString=groovyws+standalone

Tks a lot!

(search for "groovyws standalone")

Note: I saw this tip here.



来源:https://stackoverflow.com/questions/6748383/is-there-a-groovyws-jar-with-all-his-dependences

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