【发布时间】:2014-05-15 05:19:30
【问题描述】:
使用 Maven 解析器为 Artifactory 配置身份验证的正确方法是什么?
目前我正在使用:
grails.project.ivy.authentication = {
repositories {
mavenRepo "http://SERVER:8081/artifactory/remote-repos"
}
credentials {
realm = "Artifactory Realm"
host = "SERVER"
username = "USER"
password = "PASSWORD"
}
}
grails.project.dependency.resolver = "maven" // or ivy
grails.project.dependency.resolution = {
// inherit Grails' default dependencies
inherits("global") {
// specify dependency exclusions here; for example, uncomment this 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
legacyResolve false // whether to do a secondary resolve on plugin installation, not advised and here for backwards compatibility
repositories {
inherits true // Whether to inherit repository definitions from plugins
// mavenLocal()
mavenRepo id: 'Artifactory', url: "http://SERVER:8081/artifactory/remote-repos"
}
如果我将解析器更改为“ivy”,则会下载依赖项。
使用 maven 解析器 Artifactory 请求日志显示 401 错误
相关 Grails 文档:http://grails.org/doc/latest/guide/conf.html#dependencyRepositories
也许它还没有为 Maven 更新。
【问题讨论】:
-
我在使用 grails 2.4.0 时遇到了同样的问题,您找到解决方案了吗?
标签: maven grails artifactory