Java gradle无法在maven存储库中找到工件
我正在做一个简单的gradle构建,我已经在我的内部sonatype maven repo中部署了一个特定的工件 我的build.gradle文件如下所示:Java gradle无法在maven存储库中找到工件,java,maven,gradle,Java,Maven,Gradle,我正在做一个简单的gradle构建,我已经在我的内部sonatype maven repo中部署了一个特定的工件 我的build.gradle文件如下所示: apply plugin: 'java' sourceCompatibility = 1.8 version = '1.0' repositories { mavenCentral() maven {url "http://maven.ebay.com/nexus/content/repositories/sre-sna
apply plugin: 'java'
sourceCompatibility = 1.8
version = '1.0'
repositories {
mavenCentral()
maven {url "http://maven.ebay.com/nexus/content/repositories/sre-snapshots/"}
}
dependencies {
compile group: "com.typesafe", name: "config", version: "1.3.0"
//compile project(':metrics')
compile group: 'com.ebay.telemetry', name: 'client-library', version: '0.1-SNAPSHOT'
compile group: "org.slf4j", name: "slf4j-jdk14", version: "1.7.12"
testCompile group: 'junit', name: 'junit', version: '4.11'
}
compile group: 'net.alchim31', name: 'metrics-influxdb', version: '0.7.1-ebay-SNAPSHOT'
我在命令行上运行这个命令:gradlebuild
我得到这个错误:
> Could not find net.alchim31:metrics-influxdb:0.7.1-ebay-SNAPSHOT.
Searched in the following locations:
https://repo1.maven.org/maven2/net/alchim31/metrics-influxdb/0.7.1-ebay-SNAPSHOT/maven-metadata.xml
http://maven.ebay.com/nexus/content/repositories/sre-snapshots/net/alchim31/metrics-influxdb/0.7.1-ebay-SNAPSHOT/maven-metadata.xml
http://maven.ebay.com/nexus/content/repositories/sre-snapshots/net/alchim31/metrics-influxdb/0.7.1-ebay-SNAPSHOT/metrics-influxdb-0.7.1-ebay-20150708.054833-4.pom
http://maven.ebay.com/nexus/content/repositories/sre-snapshots/net/alchim31/metrics-influxdb/0.7.1-ebay-SNAPSHOT/metrics-influxdb-0.7.1-ebay-20150708.054833-4.jar
但是当我去
我看到以下文件:
那么,当我的回购协议中有metrics-influxdb-0.7.1-ebay-20150708.054833-4.jar时,gradle为什么要寻找metrics-influxdb-0.7.1-ebay-20150708.054830-3.jar似乎您已经声明了除上面显示的依赖项之外的另一个依赖项。它应该看起来像这样:
apply plugin: 'java'
sourceCompatibility = 1.8
version = '1.0'
repositories {
mavenCentral()
maven {url "http://maven.ebay.com/nexus/content/repositories/sre-snapshots/"}
}
dependencies {
compile group: "com.typesafe", name: "config", version: "1.3.0"
//compile project(':metrics')
compile group: 'com.ebay.telemetry', name: 'client-library', version: '0.1-SNAPSHOT'
compile group: "org.slf4j", name: "slf4j-jdk14", version: "1.7.12"
testCompile group: 'junit', name: 'junit', version: '4.11'
}
compile group: 'net.alchim31', name: 'metrics-influxdb', version: '0.7.1-ebay-SNAPSHOT'
如果您找到此依赖项声明,您还可能找到问题的根源
第二种可能性是,您的maven-metadata.xml(at)混乱不堪,指向不存在的build 4。除了上面显示的依赖项之外,您似乎还声明了另一个依赖项。它应该看起来像这样:
apply plugin: 'java'
sourceCompatibility = 1.8
version = '1.0'
repositories {
mavenCentral()
maven {url "http://maven.ebay.com/nexus/content/repositories/sre-snapshots/"}
}
dependencies {
compile group: "com.typesafe", name: "config", version: "1.3.0"
//compile project(':metrics')
compile group: 'com.ebay.telemetry', name: 'client-library', version: '0.1-SNAPSHOT'
compile group: "org.slf4j", name: "slf4j-jdk14", version: "1.7.12"
testCompile group: 'junit', name: 'junit', version: '4.11'
}
compile group: 'net.alchim31', name: 'metrics-influxdb', version: '0.7.1-ebay-SNAPSHOT'
如果您找到此依赖项声明,您还可能找到问题的根源
第二种可能性是,您的maven-metadata.xml(at)混乱不堪,指向不存在的构建4