I have a configuration called jres.
In the dependencies section, I have:
jres group: 'jre', name: 'jre', version: '7u60', classifier: 'solaris64', ext: 'tar.gz'
jres group: 'jre', name: 'jre', version: '7u17', classifier: 'linux-x64', ext: 'tar.gz'
jres group: 'jre', name: 'jre', version: '7u17', classifier: 'windows-x64', ext: 'tar.gz'
I have a downloadDependencies task that does this:
configurations.jres.resolvedConfiguration.resolvedArtifacts.each { artifact ->
project.copy {
from artifact.file
into "build/jres"
}
}
But when building, I get this weird error:
:upgrader:downloadDependencies FAILED
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\xxxx\build.gradle' line: 57
* What went wrong:
Execution failed for task ':upgrader:downloadDependencies'.
> Artifact 'jre:jre:7u60:jre-linux-x64.tar.gz' not found.
Why is the artifact resolver try to download ‘jre:jre:7u60:jre-linux-x64.tar.gz’ ? This does not seem to be an artfact that I declared in my dependencies. I didn’t have the problem until I added the solaris jre as a dependency (and then, the two dependencies were having the same version (7u17). I only introduced a new version (7u60) with the new dependency and now this prevents the previous dependencies to be found because they are looked for with the incorrect version.
Am I missing something? Is there any way to work around this without me having to rename my artifacts or change their coordinates in the repository?
Thanks in advance,
Laurent.