0
新建Grails和嘗試使用的HttpClient從Apache來使用它集成測試...所以我把它的依賴:Grails中使用了HTTPClient 2.4
dependencies {
// specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes e.g.
// runtime 'mysql:mysql-connector-java:5.1.29'
// runtime 'org.postgresql:postgresql:9.3-1101-jdbc41'
test "org.grails:grails-datastore-test-support:1.0-grails-2.4"
compile 'org.apache.httpcomponents:httpcore:4.1.2'
compile 'org.apache.httpcomponents:httpclient:4.1.2'
build 'org.apache.httpcomponents:httpcore:4.1.2'
build 'org.apache.httpcomponents:httpclient:4.1.2'
test 'org.apache.httpcomponents:httpcore:4.1.2'
test 'org.apache.httpcomponents:httpclient:4.1.2'
}
在build.config,預計能使用它的測試,如
class MyControllerTests extends GroovyTestCase {
@Test
void testApacheHttpClient() {
def client = new HttpClient()
}
}
但是我不能讓它工作,因爲Grails是無法解決任何類。
我試過手動導入沒有成功。
我在做什麼錯了?
在此先感謝。
我現在看到的是平時無聊的事情,但我仍花費相當多的時間試圖弄明白。通常的事情......謝謝。 – Rafael 2014-10-10 16:31:53