无法从Gradle项目中的Artifactory存储库下载jar

时间:2019-06-04 09:08:37

标签: maven gradle repository artifactory

我想连接到Artifactory存储库

https://www.artifactrepository.citigroup.net/artifactory/webapp/#/artifacts/browse/tree/General/

并使用build.gradle下载一个jar。

我的代码中有2个存储库,我想连接它们:一个是本地存储库,是我下载所有Gradle相关罐子的地方,另一个是人工存储库,我想下载TIBCO相关罐子的。 但无法连接到第二个仓库 这是我的build.gradle代码

buildscript {
    repositories {
        maven {
            url "${artifactory_contextUrl}/plugins-release"

        }

        maven {
            url 'https://www.artifactrepository.citigroup.net/artifactory/maven-cto-dev-3rdpartymanual-local'
        } 
    }
    dependencies {
        classpath(group: 'org.jfrog.buildinfo', name: 'build-info-extractor-gradle', version: '2.0.9')
    }

}

allprojects {
    apply plugin: 'artifactory'
    apply plugin: 'maven'


    group = 'com.citi.recon'

    task wrapper(type: Wrapper) {
        distributionUrl = "${artifactory_contextUrl}/simple/ext-release-local/org/gradle/services/distributions/gradle/1.9/gradle-1.9-bin.zip"
        description = 'Generates gradlew[.bat] scripts'
        gradleVersion = '1.9'
    }

}


artifactory {
    contextUrl = "${artifactory_contextUrl}"   //The base Artifactory URL if not overridden by the publisher/resolver
    publish {
        repository {
            repoKey = 'libs-release-local'
            maven = true

        }
    }
    resolve {
        repository {
            repoKey = 'repo'
            maven = true

        }
    }
}

0 个答案:

没有答案