我的Grails(2.3.6)应用的BuildConfig.groovy
:
grails {
project {
dependency {
resolution = {
repositories {
inherits true
grailsHome()
mavenLocal()
mavenRepo "http://myartifactory01/myrepo"
grailsPlugins()
grailsCentral()
mavenCentral()
}
plugins {
compile ":myplugin:0.1"
}
}
}
}
server {
port {
http = 4384
}
}
}
当我运行
run-app
时,出现以下错误:| Error Required Grails build dependencies were not found. This is normally
due to internet connectivity issues (such as a misconfigured proxy) or missing
repositories in grails-app/conf/BuildConfig.groovy. Please verify your
configuration to continue.
我已经验证URL指向存储
myplugin
插件的有效(人工)Maven存储库。我的BuildConfig
有问题吗?它缺少任何属性,还是配置错误?
最佳答案
我需要在grails插件之前添加我的mavenRepo,因为使用了Mavendependency.resolver:
repositories {
inherits true // Whether to inherit repository definitions from plugins
//mavenRepo "http://myrepo:8081/artifactory/plugins-snapshot-local"
mavenRepo "http://myrepo:8081/artifactory/plugins-release-local"
grailsPlugins()
grailsHome()
mavenLocal()
grailsCentral()
mavenCentral()
// uncomment these (or add new ones) to enable remote dependency resolution from public Maven repositories
//mavenRepo "http://repository.codehaus.org"
//mavenRepo "http://download.java.net/maven/2/"
//mavenRepo "http://repository.jboss.com/maven2/"
}
关于maven - Grails 2.3.6缺少 repo 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24938184/