Gradle 3.x behavior change wrt classifier artifact resolution in ivy modules


(Szczepan Faber) #1

When we bump Gradle from 2 to 3 in our play-on-gradle projects the builds fail at dependency resolution. It looks like Gradle tries to download additional artifacts, some xml files. Those xml files do not exist in our artifactory.

FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all files for configuration ':play-skeleton-mt:play'.
> Could not find play-mt-pseudo.xml (
  Searched in the following locations:
> Could not find restli-server-plugin-cmpt-def.xml (
  Searched in the following locations:
> Could not find monitoring-plugin-cmpt-def.xml (
  Searched in the following locations:

We will do more digging on our end and try to figure out what modules are pulling in the xml files. If you have any feedback suggestions, let us know. For example, why is there a difference between how Gradle 2 and 3 resolve dependencies in this scenario?

(Szczepan Faber) #2

What versions of Gradle are you upgrading to/from?

2.14.1 -> 3.0

What version of Play! are you using?

I isolated the problem it is not related to play. The way Gradle resolves ivy artifacts has changed between 2.14.1 and 3.0. Consider following ivy module in our internal artifactory:

(directory in artifactory)

Then I declare dependency on What happens when I resolve the Gradle configuration with this dependency:

  1. Gradle 2.14.1 - 2 artifacts are downloaded: jar and xml
  2. Gradle 3.0 - Gradle throw exception:
   > Could not find urls-plugin-cmpt-def.xml (
     Searched in the following locations:

Note that Gradle 2.14.1 looks for “urls-plugin-cmpt-def-6.0.22-cmpt-def.xml” but Gradle 3.0 looks for “urls-plugin-cmpt-def-6.0.22.xml”. Given the content of the ivy file and the artifact name, Gradle 2.14.1 behavior seems correct.

Can you suggest us an approach to go past this problem? We are very keen on using Gradle 3.3 otherwise IDEA integration does not work for our Play on Gradle products. Thanks in advance for the help!


It looks like you’re hitting the fact that we now require the classifier attribute to be correctly declared in the namespace. See this GH issue and particularly this comment for more discussion on this.

Please try changing urls-plugin-6.0.22.ivy to look like this:

<ivy-module version="2.0" xmlns:m="">
    ... snip ...
        <artifact name="urls-plugin-cmpt-def" type="cmpt-def" ext="xml" conf="cmpt-def" 

Note the different namespace for the classifier attribute.

If this addresses your issue we can consider whether we should update Gradle to honour a “classifier” defined in the “extra attributes” namespace.

(Szczepan Faber) #4

Thanks Daz for investigating the issue!

We have many artifacts published this way, mostly from the play / sbt builds. I will dig into how we can use your findings to resolve our issue. Given that we cannot easy change already published artifacts, do you have any other recommendations and suggestions?


There’s no real workaround, but I’ve pushed a fix that should make it into the next major release.

(Szczepan Faber) #6

I verified the fix works at LinkedIn, tested with 3 projects using nightly Gradle from 2/14. THANKS A BUNCH!