1
votes

I am doing a simple gradle build and I have deployed a particular artifact to my internal sonatype maven repo

My build.gradle file looks like this:

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'
}

I run this command on the command line: gradle build

I get this error:

> 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

However when I go to http://maven.ebay.com/nexus/content/repositories/sre-snapshots/net/alchim31/metrics-influxdb/0.7.1-ebay-SNAPSHOT/

I see the following files :

  1. metrics-influxdb-0.7.1-ebay-20150708.054830-3.pom
  2. metrics-influxdb-0.7.1-ebay-20150708.054830-3.jar

So why is gradle looking for metrics-influxdb-0.7.1-ebay-20150708.054833-4.jar when my repo has metrics-influxdb-0.7.1-ebay-20150708.054830-3.jar

1

1 Answers

0
votes

It seems like you have declared another dependency besides the one you showed above. It should probably look something like this:

compile group: 'net.alchim31', name: 'metrics-influxdb', version: '0.7.1-ebay-SNAPSHOT'

If you find this dependency declaration, you might also find the source of the problem.

The second possibility is, that your maven-metadata.xml (at http://maven.ebay.com/nexus/content/repositories/sre-snapshots/net/alchim31/metrics-influxdb/0.7.1-ebay-SNAPSHOT/maven-metadata.xml) is messed up and points towards the nonexisting build 4.