Netflix / servo

Netflix Application Monitoring Library
Apache License 2.0
1.42k stars 298 forks source link

Fresh repository build failed #167

Closed meltser closed 11 years ago

meltser commented 11 years ago

I am trying to build fresh repository:

gradle build --stacktrace

FAILURE: Build failed with an exception.

BUILD FAILED

Environment: openSuse, gradle 1.6

brharrington commented 11 years ago

I'm guessing this is something with your setup. I tried to reproduce but a local build works fine for me even if I explicitly clear all local caches. The dependency does exist:

http://mvnrepository.com/artifact/com.google.guava/guava/11.0.2

Also, the public cloudbees build works. There was a recent failure, but that appears to be some issue with the cloudbees jenkins slave not an actual problem with the servo build.

https://netflixoss.ci.cloudbees.com/job/servo-master/

meltser commented 11 years ago

Thanks.

I know that its not the best place to ask, but do you have any idea what can the issue?

brharrington commented 11 years ago

I don't know, the stacktrace doesn't seem to provide anything useful, it is just saying not found. If you run in debug mode you should be able to see where it is trying to look. If I remove the local cache I get output like:

$ ./gradlew build -d > build.log
$ cat build.log | grep guava | cut -c-1024
08:32:10.260 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.DependencyGraphBuilder] Selecting new module version com.google.guava#guava;11.0.2
08:32:10.260 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.ivyresolve.UserResolverChain] Attempting to resolve module 'com.google.guava:guava:11.0.2' using repositories [MavenLocal, MavenRepo, maven]
08:32:10.261 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver] Loading ~/.m2/repository/com/google/guava/guava/11.0.2/guava-11.0.2.pom
08:32:10.261 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver] Resource not reachable for com.google.guava#guava;11.0.2: res=MissingResource: ~/.m2/repository/com/google/guava/guava/11.0.2/guava-11.0.2.pom
08:32:10.261 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver] Loading ~/.m2/repository/com/google/guava/guava/11.0.2/guava-11.0.2.jar
08:32:10.261 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver] Resource not reachable for com.google.guava#guava;11.0.2: res=MissingResource: ~/.m2/repository/com/google/guava/guava/11.0.2/guava-11.0.2.jar
08:32:10.261 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver] No ivy file nor artifact found for module 'com.google.guava#guava;11.0.2' in repository 'MavenLocal'.
08:32:10.263 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver] Loading http://repo1.maven.org/maven2/com/google/guava/guava/11.0.2/guava-11.0.2.pom
08:32:10.263 [DEBUG] [org.gradle.api.internal.externalresource.transfer.DefaultCacheAwareExternalResourceAccessor] Constructing external resource: http://repo1.maven.org/maven2/com/google/guava/guava/11.0.2/guava-11.0.2.pom
08:32:10.266 [DEBUG] [org.gradle.api.internal.externalresource.transport.http.HttpResourceAccessor] Constructing external resource: http://repo1.maven.org/maven2/com/google/guava/guava/11.0.2/guava-11.0.2.pom
08:32:10.266 [DEBUG] [org.gradle.api.internal.externalresource.transport.http.HttpClientHelper] Performing HTTP GET: http://repo1.maven.org/maven2/com/google/guava/guava/11.0.2/guava-11.0.2.pom
...
meltser commented 11 years ago

I run gradle build with sudo and it worked...weird

Thanks anyway.

brharrington commented 11 years ago

If sudo fixed it my guess would be one of two things:

  1. Your default user doesn't have the right file permissions.
  2. Sudo caused it to have a different home directory so it didn't use an existing maven cache in your normal home directory. There are a number of issues that you can hit, for example:

http://issues.gradle.org/browse/GRADLE-2034

In that case if you somehow get to a state where you have a pom in the local cache but the jar is missing it will fail. Assuming you are using the default settings you might try removing the local maven cache and see if the problem clears up.

$ rm -rf ~/.gradle ~/.m2

brharrington commented 11 years ago

Closing the issue since you seem to have a workaround.