I have an application build that is working fine with version 1.8, but does not work with 1.9-rc-2.
Here is the output I’m getting:
...
:services-lib:compileJava
Resource missing. [HTTP GET: http://my.nexus.repo.com/nexus/content/groups/psd/commons-lang/commons-lang/working@WTML11fd4ec1f.local/commons-lang-working@WTML11fd4ec1f.local.pom]
Resource missing. [HTTP HEAD: http://my.nexus.repo.com/nexus/content/groups/psd/commons-lang/commons-lang/working@WTML11fd4ec1f.local/commons-lang-working@WTML11fd4ec1f.local.jar]
:services-lib:compileJava (Thread[Daemon Thread 3,5,main]) completed. Took 15.941 secs.
FAILURE: Build failed with an exception.
* What went wrong:
Could not resolve all dependencies for configuration ':services-lib:provided'.
> Could not find commons-lang:commons-lang:working@WTML11fd4ec1f.local.
Required by:
com.sample.libs:services-lib:8.12.0-SNAPSHOT > com.sample.libs:bhp-auth:6.2.5.1
com.sample.libs:services-lib:8.12.0-SNAPSHOT > com.sample.libs:bhp-commons:6.2.5.1
com.sample.libs:services-lib:8.12.0-SNAPSHOT > com.sample.libs:bhp-auth-valve:6.2.5.1
* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.
When I run this in debug mode, I see http gets like the following being made:
I don’t quite understand where WTML11fd4ec1f.local/commons-lang-working@WTML11fd4ec1f.local.jar is coming from but clearly that path is not going to be in my nexus repository.
I’m not sure how to begin to troubleshoot this or try to carve this down to a simpler use case that reproduces the problem. Any help would be appreciated.
Thanks for reporting this issue. It seems as if the version of the dependency “commons-lang” cannot be resolved. The version you see in the console output indicates that it cannot be resolved correctly.
Would you mind providing us with the POM that defines this dependency? I assume that the version of this dependency is provided by a parent POM dependency management element. It would be great if you could post that relevant piece of the parent POM as well (including properties if used).
I publshed these poms to my maven repo and then ran the build.
It works fine in gradle 1.8, but in gradle 1.9-rc-2, I get the following output:
[WTML11fd4ec1f:gradle/bugs/prob1] dlethin% ~/tools/gradle/gradle-1.9-rc-2/bin/gradle clean copyToLib
:clean UP-TO-DATE
:copyToLib
FAILURE: Build failed with an exception.
* What went wrong:
Could not resolve all dependencies for configuration ':runtime'.
> Could not find commons-lang:commons-lang:working@WTML11fd4ec1f.local.
Required by:
:prob1:unspecified > com.dougy.sample:shared-lib:2.0
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 0.804 secs
Seems 1.9-rc-2 is having some trouble dealing with poms where the version is specified in a parent’s dependencyManagement section.
Thanks for looking into this. Let me know if you need any additional info.
Ah. OK, with my cache deleted, my build worked. Though it took 37 minutes to re-download all my dependencies. The 2nd time after that I ran a clean build and it took 30 seconds)