groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jochen Theodorou <>
Subject Re: Potential questionable situation in Grapes Module Loading
Date Sun, 24 Mar 2019 21:01:43 GMT
On 24.03.19 15:32, wrote:
> Dear Groovy Dev Mailing List,
> When I follow Gradle recommendations in terms of dependency scopes of my Groovy Library,
in the end it produces errors when loaded via Grapes from Groovy Console/Groovy Shell:
> groovy.lang.GroovyRuntimeException: Conflicting module versions. Module [groovy-xml is
loaded in version 2.5.6 and you are trying to load version 2.5.4
> The build.gradle contains nothing more than the below in terms of dependencies:
> ..
> dependencies {
>      compile 'org.codehaus.groovy:groovy-all:2.5.4'
> ..
> }
> ..
> Question: the Gradle documentation has to be fixed, or there is bug in Grapes?
> Gradle documentation in question:

setting a compile dependency should not be done with Grapes. And afaik
it is not done like that in Gradle. You have a class loader that tries
to init the Groovy system for 2.5.4, while version 2.5.6 modules are
visible and chosen by the class loading. In a "normal" Gradle setup this
is not the case. I have used this in dozens of projects and it was never
a problem because Gradle internally prevents this from happening.

So first of all... What gradle version and is 2.5.6 the groovy version
in that gradle? If not where does it come from? If you do not even have
a Groovy on your classpath and your build file contains only that
dependencies declaration (plus a bit), then this sounds like a bug in
gradle. But maybe, if you explain a bit more, we can find out if that is
really the case or not

bye Jochen

bye Jochen

View raw message