我对JFrog Artifactory很新,但这是我的要求:我想使用Artifactory解决我的编译依赖关系并将构建的工件发布到Artifactory。现在我使用gradle进行构建。通过初始教程,我能够将我的工件发布到存储库。但是现在我希望能够使用Artifactory编译我的项目。我的项目有一些第三方依赖项让我们说commons-logging和antlr。我的脚本如下
artifactory {
contextUrl = 'http://localhostr:8081/artifactory' //The base Artifactory URL if not overridden by the publisher/resolver
publish {
repository {
repoKey = 'gradle-dev-local'
username = "${artifactory_user}"
password = "${artifactory_password}"
maven = true
}
defaults {
publications ('mavenJava')
publishPom = false
}
}
resolve {
repository {
repoKey = 'gradle-dev'
username = "${artifactory_user}"
password = "${artifactory_password}"
maven = true
}
}
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.web
}
}
}
dependencies {
compile 'antlr:antlr:2.7.6',
'commons-logging:commons-logging:1.1'
}
现在我想知道我是如何以gradle格式在gradle-dev存储库中拥有这些第三方的dependecnies。我的gradle项目总共使用了大约40-50个这样的第三方。有没有更简单的方法将所有这些dependecnies复制到我的Artifactory?
提前致谢