Confusing error messages regarding the configuration name when there is a version conflict


(Etienne Studer) #1

Hi

If I run ‘gradle assemble’ from the root of my multi-project build, I get this (which is okay):

Could not resolve all dependencies for configuration ‘:edoras-commons-test:compile’. > A conflict was found between the following modules:

  • org.hamcrest:hamcrest-core:1.1

  • org.hamcrest:hamcrest-core:1.3

I then run ‘gr dependencyInsight --configuration :edoras-commons-test:compile --dependency org.hamcrest:hamcrest-core’ and get the following message:

Configuration with name ‘:edoras-commons-test:compile’ not found.

I’m confused: first, Gradle tells me there is a conflict in a given configuration, and then when I inspect that configuration, it tells me the configuration does not exist.

Can anybody help me out?

Thanks and regards, Etienne


(Peter Niederwieser) #2

You need to run ‘gradle :edoras-commons-test:dependencyInsight --configuration compile’, not ‘gradle dependencyInsight --configuration :edoras-commons-test:compile’.


(Etienne Studer) #3

Ok Thanks, Peter.

In this case, I propose to improve the error message ‘Could not resolve all dependencies for configuration ‘:edoras-commons-test:compile’’

to something like

‘Could not resolve all dependencies for configuration ‘compile’ in module :edoras-commons-test’


(Peter Niederwieser) #4

Raised GRADLE-3035.


(Etienne Studer) #5

Thanks, Peter.