Grails无法从http://repo.grails.org/grails/repo下载rest-0.8.zip。这是我的BuildConfig.groovy。猜猜我已经配置了存储库rite
grails.servlet.version = "2.5" // Change depending on target container compliance (2.5 or 3.0)
grails.offline.mode=false
grails.project.class.dir = "target/classes"
grails.project.test.class.dir = "target/test-classes"
grails.project.test.reports.dir = "target/test-reports"
grails.project.target.level = 1.6
grails.project.source.level = 1.6
grails.project.war.file = "target/${appName}.war"
grails.project.dependency.resolution = {
inherits("global") {
// uncomment to disable ehcache
// excludes 'ehcache'
}
log "warn" // log level of Ivy resolver, either 'error', 'warn', 'info', 'debug' or 'verbose'
checksums true // Whether to verify checksums on resolve
repositories {
inherits true // Whether to inherit repository definitions from plugins
grailsPlugins()
grailsHome()
grailsCentral()
mavenCentral()
mavenRepo "http://repo.grails.org/grails/repo/"
}
dependencies {
compile 'org.codehaus.jackson:jackson-mapper-asl:1.9.13'
compile 'commons-codec:commons-codec:1.6'
}
plugins {
runtime ":hibernate:$grailsVersion"
runtime ":jquery:1.7.1"
runtime ":resources:1.1.6"
compile ":spring-security-core:1.2.7.3"
compile ":spring-security-mock:1.0.1"
compile ":spring-security-ldap:1.0.6"
compile ":joda-time:1.4"
compile ":cache-headers:1.1.5"
build ":rest:0.8"
test ":code-coverage:1.2.5"
build ":tomcat:$grailsVersion"
}
}
但是没有下载rest-0.8.zip
==== grailsCentral: tried
http://grails.org/plugins/grails-rest/tags/RELEASE_0.8/grails-rest-0.8.zip
==== mavenCentral: tried
http://repo1.maven.org/maven2/org/grails/plugins/rest/0.8/rest-0.8.zip
==== http://repo.grails.org/grails/repo/: tried
http://repo.grails.org/grails/repo/org/grails/plugins/rest/0.8/rest-0.8.zip
==== http://repo.grails.org/grails/plugins: tried
http://repo.grails.org/grails/plugins/org/grails/plugins/rest/0.8/rest-0.8.zip
::::::::::::::::::::::::::::::::::::::::::::::
:: FAILED DOWNLOADS ::
:: ^ see resolution messages for details ^ ::
::::::::::::::::::::::::::::::::::::::::::::::
:: org.grails.plugins#rest;0.8!rest.zip
::::::::::::::::::::::::::::::::::::::::::::::
知道我哪里错了吗?
答案 0 :(得分:0)
我不确定你为什么要为插件声明构建。尝试更改依赖项部分以遵循REST插件文档并声明compile
plugins {
runtime ":hibernate:$grailsVersion"
runtime ":jquery:1.7.1"
runtime ":resources:1.1.6"
compile ":spring-security-core:1.2.7.3"
compile ":spring-security-mock:1.0.1"
compile ":spring-security-ldap:1.0.6"
compile ":joda-time:1.4"
compile ":cache-headers:1.1.5"
//changed to compile from build
compile ":rest:0.8"
test ":code-coverage:1.2.5"
build ":tomcat:$grailsVersion"
}