我得到了
解决错误获取依赖项:无法在grailsCentral(https://repo.grails.org/grails/plugins)中找到工件org.grails.plugins:rest-client-builder:jar:2.1.1(使用--stacktrace查看完整跟踪)< / p>
使用此BuildConfig.groovy:
repositories {
inherits true // Whether to inherit repository definitions from plugins
grailsPlugins()
grailsHome()
mavenLocal()
grailsCentral()
mavenCentral()
mavenRepo "http://repo.spring.io/milestone"
mavenRepo "http://repo1.maven.org/maven2/"
mavenRepo "http://repo.grails.org/grails/core"
mavenRepo "http://repo.grails.org/grails/plugins"
}
dependencies {
test "org.grails:grails-datastore-test-support:1.0.2-grails-2.4"
compile 'commons-beanutils:commons-beanutils:1.8.3'
runtime 'mysql:mysql-connector-java:5.1.34'
compile 'com.maxmind.geoip2:geoip2:2.7.0'
compile 'org.apache.httpcomponents:httpclient:4.5.2'
compile "org.grails.plugins:rest-client-builder:2.1.1"
}
我试过平常:
grails clean
grails refresh-depenencies
但没有运气。很多人都有同样的问题,但不幸的是他们的“修复”都没有奏效。
答案 0 :(得分:2)
解决方案由dmahapatro提供,将定义移到插件中:
repositories {
inherits true // Whether to inherit repository definitions from plugins
grailsPlugins()
grailsHome()
mavenLocal()
grailsCentral()
mavenCentral()
mavenRepo "http://repo.spring.io/milestone"
mavenRepo "http://repo1.maven.org/maven2/"
mavenRepo "http://repo.grails.org/grails/core"
mavenRepo "http://repo.grails.org/grails/plugins"
}
plugins {
build ":tomcat:8.0.20"
:
compile "org.grails.plugins:rest-client-builder:2.1.1"
}