Cool.. this is the route I ended up going.

Is it a limitation of Ivy (or is it a, "I should try to write it and contribute 
to gradle hah") that excluding specific versions of a module/group isn't 
possible?

THanks for your response!

Roger

On Nov 15, 2009, at 8:55 PM, Adam Murdoch wrote:

> 
> 
> Roger Studner wrote:
>> I'm trying to do something like this:
>> 
>> configurations {
>>  all*.exclude group: "org.springframework" }
>> 
>> dependencies {
>>      groovy 'org.codehaus.groovy:groovy:1.6.5' 
>>    compile 'org.springframework:spring:2.5.6'
>>      compile 'org.springframework:spring-tx:2.5.6'
>>      compile 'org.springframework:spring-aop:2.5.6'          
>>      compile 'org.springframework.security:spring-security-core:2.0.4'
>> ...
>> }
>> 
>> Now, I can't do all*.exclude group: "org.springframework", version: "2.0.8"  
>> (the source doesn't seem to allow for version).
>> 
>> The issue (long standing as well in the Maven world) is that Spring Secrutiy 
>> 2.0.4 has a dependency (in the POMs) on Spring 2.0.8.
>> 
>> In Maven, this is easy to resolve using <exclude> etc.
>> 
>> That doesn't seem to be possible with gradle (now, this is just a baiting 
>> statement heh).
>> 
>> Right now I sort of do a manual/hack dual pass... get all the stuff, put 
>> files in lib.. run another task, delete what I dont want.. run another one, 
>> to use a flatDir repo.
>> 
>> Eee gads!
>> 
>> Any ideas?
>> 
>>  
> 
> You can add exclude rules to a dependency as well:
> 
> dependencies {
>   compile('org.springframework.security:spring-security-core:2.0.4') {
>       exclude group: 'org.springframework'
>   }
> }
> 
> 
> There's a little bit more detail at 
> http://gradle.org/0.8/docs/userguide/dependency_management.html#sub:exclude_transitive_dependencies
> 
> 
> -- 
> Adam Murdoch
> Gradle Developer
> http://www.gradle.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
> 
>   http://xircles.codehaus.org/manage_email
> 
> 


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to