0

I'm building pretty straigh-forward:

$ gradle clean test war -b build.gradle

Gradle says:

:clean UP-TO-DATE
:compileJava

FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all dependencies for configuration ':compile'.
> Could not find mvc-tools.jar (net.virtalab:mvc-tools:2.1).
Searched in the following locations:
     http://dl.bintray.com/virtalab/maven/net/virtalab/mvc-tools/2.1/mvc-tools-2.1.jar

While there is JAR on given URL:

$ wget http://dl.bintray.com/virtalab/maven/net/virtalab/mvc-tools/2.1/mvc-tools-2.1.jar
...
HTTP request sent, awaiting response... 200 OK
Length: 27222 (27K) [application/java-archive]
...
$ file mvc-tools-2.1.jar
mvc-tools-2.1.jar: Zip archive data, at least v1.0 to extract

My build.gradle is:

repositories {
//local maven repo if possible
mavenLocal()
//bintray
maven {
    url "http://dl.bintray.com/virtalab/maven"
}
//our jcenter cache
maven {
    url 'http://maven.virtadev.net/jcenter'
}
}

What I already did?

  • Launch with --debug (still no idea why gradle stucks)
  • rm -rf .gradle
kyberorg
  • 637
  • 1
  • 8
  • 22
  • Are you getting this error also `Could not find org.sonatype.oss:oss-parent:7.`? – seenukarthi Aug 28 '15 at 17:26
  • Wow, that's really puzzling. Can you run gradle in debug? Maybe we'll see some clues there. – JBaruch Aug 28 '15 at 18:20
  • @JBaruch here it is. I did a debug run: https://gist.github.com/kyberorg/b0c13e82e0b07cc2a0d5 – kyberorg Aug 28 '15 at 18:33
  • @KarthikeyanVaithilingam no I don't. – kyberorg Aug 28 '15 at 18:35
  • Can you please check whether the artifact (mvc-tools jar) is already cached in either your Maven local cache (.m2) or in Gradle local cache (.gradle)? – JBaruch Aug 28 '15 at 19:08
  • @JBaruch I found mvc-tools at .gradle cache, but there was only .pom file bot .jar one. I found it at: ~/.gradle/caches/modules-2/files-2.1/ I've deleted ~/.gradle/caches/modules-2/files-2.1/net.virtalab/mvc-tools and ~/.gradle/caches/modules-2/metadata-2.15/descriptors/net.virtalab/mvc-tools and re-run build. Build failed with exactly same error and as previously there is only .pom file – kyberorg Aug 28 '15 at 19:19
  • What about `/usr/local/jenkins/.m2/repository/net/virtalab/mvc-tools/2.1/mvc-tools-2.1.jar`? Does it exist? – JBaruch Aug 28 '15 at 19:30
  • @JBaruch there no `/usr/local/jenkins/.m2/` at all. Additionally there is no `/usr/local/jenkins/workspace/job-name-here/.m2` – kyberorg Aug 28 '15 at 19:34

1 Answers1

0

Finally problem solved by deleting ~/.gradle directory

kyberorg
  • 637
  • 1
  • 8
  • 22
  • misunderstanding occured somewhere. I tried deleting: `/usr/local/jenkins/workspace/job-name-here/.gradle` – kyberorg Aug 28 '15 at 20:59