1
我正在編寫一個使用HtmlUnit的插件,今天早上我遇到了一個依賴項問題。默認情況下,當你創建一個插件時,添加了tomcat和release插件。我添加了HtmlUnit的依賴項,並在實例化HtmlUnitDriver實例時開始接收錯誤。使用HtmlUnit和Release插件的Grails 2.0依賴項解析
我BuildConfig.groovy:
dependencies {
test("org.seleniumhq.selenium:selenium-htmlunit-driver:$seleniumVersion") {
exclude "xml-apis"
}
}
plugins {
build ":tomcat:$grailsVersion"
//build ":release:1.0.0"
}
簡單的測試案例:
@Test
void stuff() {
def driver = new HtmlUnitDriver(true)
}
當釋放插件不包括測試通過。當包括釋放插件測試失敗:java.lang.NoSuchMethodError: org.apache.http.conn.scheme.Scheme.
我用Google搜索周圍的錯誤和碰到這個傳來:
我如何使用版本的插件(我假設我需要它最終發佈插件),並沒有與我的版本的HtmlUnit擰?