One of my dependencies doesn't seem to be resolved properly (tu17

(laurentdroin) #1

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,


(laurentdroin) #2

Doing some research, I added


in my jres cofniguration and can see that there is a conflict:

> Could not resolve all dependencies for configuration ':upgrader:jres'.
   > A conflict was found between the following modules:
      - jre:jre:7u60
      - jre:jre:7u17

I was hoping that the classifier would be enough to make the distinction between artifacts.

(laurentdroin) #3

In the end, it does look like it’s my problem because I received a warning saying that I should not rely on the classifier name, and that this will be deprecated in 2.0. I guess I have to change the coordinates of my artifact after all. I’ll do so.