【发布时间】:2014-12-24 12:24:13
【问题描述】:
我在公司网络上,因此要检索我们使用 Nexus 的依赖项。 Grails repo 已添加到 nexus 存储库中,所以现在剩下的就是配置 grails 以使用 nexus。
对于 Java Maven 项目的开发,我只需要指定应该注意哪个 settings.xml 文件,因为 Nexus URL 和凭据存储在那里。
现在我们切换到 Grails,在创建一个新项目时,grails 在配置类路径上挂起大约 200 秒(因为它被配置为在 200 秒后超时),然后说:
Resolve error obtaining dependencies: Failed to read artifact descriptor for jline:jline:jar:2.12 (Use --stacktrace to see the full trace)
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.
Process was killed
现在这可能是 repo 配置的问题,但是我无法正确调试它。
我尝试调用grails refresh-dependencies --stacktrace,尝试将日志记录从error 更改为debug 和Config.groovy 中的trace。尝试在BuildConfig.groovy 中将日志记录设置为verbose(但这是针对Ivy,我们使用的是Maven,所以它当然什么也不做),现在我不确定该怎么做。
如果有帮助,这是我在 BuildConfig.groovy 中的当前 repo 配置:
repositories {
//inherits true // Whether to inherit repository definitions from plugins
grailsPlugins()
grailsHome()
mavenLocal()
mavenRepo(id:'nexusconf', url:"https://nexusurl/repository/rootrepo/") {
auth username: "user", password: "pass"
}
//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/"
}
【问题讨论】:
-
BuildConfig中的grails.project.dependency.resolver有什么价值?是maven还是ivy?