2012-09-27 68 views
0

在我的一个应用程序中,我必须使用geb和grails。我安装了geb插件并添加了依赖性硒独立jar。Grails ---加载程序约束违规

现在的问题是,而我清洗或编译我得到了错误,如以下

交互模式与错误退出:装载机约束冲突:解决重载方法"org.apache.xerces.jaxp.SAXParserImpl.getXMLReader()Lorg/xml/sax/XMLReader;"当前类的类加载器(instance of org/codehaus/groovy/grails/cli/support/GrailsRootLoader)org/apache/xerces/jaxp/SAXParserImpl,而当其超装载机(instance of <bootloader>),对在签名时所使用的类型不同org/xml/sax/XMLReader Class对象(使用--stacktrace看到完整的跟踪)

+0

运行'grails dependency-report'并搜索那里的冲突。 –

回答

2

排除硒的传递依赖于xml-apis像这样在你的BuildConfig.groovy

dependencies { 
    test("org.seleniumhq.selenium:selenium-htmlunit-driver:$seleniumVersion") { 
     exclude "xml-apis" 
    } 
    test "org.codehaus.geb:geb-spock:$gebVersion" 
    test "org.codehaus.geb:geb-junit4:$gebVersion" 
} 

有关更多详细信息,请参阅this example project

相关问题