On 11/01/2011, at 9:53 PM, helmut.denk wrote:
>
>
> Adam Murdoch-3 wrote:
>>
>> In general, there isn't. But there might be a workaround, depending on why
>> you need the conflict resolution.
>>
>
> hi adam,
>
> thanks for the answer and sorry for the delay ...
>
> here is such a situation:
>
>
> dependencies {
> compile 'org.clojure:clojure:1.2.0'
> compile 'org.clojure:clojure-contrib:1.2.0'
> compile 'enlive:enlive:1.0.0-SNAPSHOT'
> }
>
>
> enlive has a dependency on clojure too and defines it
> in it's pom like this:
>
>
> <dependency>
> <groupId>org.clojure</groupId>
> <artifactId>clojure</artifactId>
> <version>[1.1.0,)</version>
> </dependency>
>
>
> which means "resolve against latest release of
> clojure".
>
> so during the build clojure-1.2.0 is evicted:
>
>
> :: evicted modules:
> org.clojure#clojure;1.2.0 by [org.clojure#clojure;1.3.0-alpha4] in [compile]
>
>
> i would like to avoid the eviction and force resolving
> clojure-1.2.0.
I think a better option would be to make the default resolution handle this
case better. Given the following dependencies in the graph:
org.clojure:clojure:[1.1.0,)
org.clojure:clojure:1.2.0
Gradle should choose 1.2.0, as it meets both constraints. There's no need for
conflict management here, as there's no conflict.
Could you add a JIRA issue for this problem?
In the meantime, you could work around this using client modules:
dependencies {
compile module('enlive:enlive:1.0.0-SNAPSHOT' ) {
dependency 'org.clojure:clojure:1.2.0'
... whatever other dependencies it has ...
}
}
--
Adam Murdoch
Gradle Developer
http://www.gradle.org
CTO, Gradle Inc. - Gradle Training, Support, Consulting
http://www.gradle.biz