When running the "war" task for a web application project using Gradle 1.10, the following error started showing up when I included a dependency on cxf-bundle 2.6.13:
Could not resolve all dependencies for configuration ':runtime'.
Could not resolve <exclude org: module="l:ame="*" type="*.
Required by:
:gradle_dep_issue_example:unspecified > org.apache.cxf:cxf-bundle:2.6.13
java.lang.IllegalArgumentException (no error message)
Stopping and starting the gradle daemon has no effect, nor does clearing out the .gradle folder. However, running the war task and passing the --refresh-dependencies option does resolve the issue. Unfortunately, the --refresh-dependencies option must be used every time.
Here is a small build.gradle file which will reproduce the issue when the "downloadRuntimeDeps" task is run.
apply plugin: 'war'
repositories {
mavenCentral()
}
dependencies {
compile 'org.apache.cxf:cxf-bundle:2.6.13'
}
task downloadRuntimeDeps(type: Copy){
from configurations.runtime
into new File(getBuildDir(), "/runtime-deps/")
}
The issue ended up only impacting gradle version 1.10. I tested with versions 1.8 and 1.11, and neither had this problem.
There are no bug fixes included in the release notes for gradle 1.11 that reference an issue like this, so I assume this was fixed while resolving a seemingly unrelated issue.
The solution was to upgrade all my projects to use gradle 1.11
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments