So this somehow isn't in the gradle user guide.

How do I exclude a transitive dependency?

If I try to do this:

dependencies {

    compile 'org.springframework:spring:2.5.6'  
        compile 'org.springframework.security:spring-security-core:2.0.4'
}

security pulls down all of spring 2.0.8.

In Maven, people do this:
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-core</artifactId>
            <version>${springsecurity-version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.springframework</groupId>
                    <artifactId>spring-support</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.springframework</groupId>
                    <artifactId>spring-aop</artifactId>
                </exclusion>
            </exclusions>
        </dependency>


If I go to this link: http://jira.codehaus.org/browse/GRADLE-154

I see doing addDependency()  w/ exclude etc.. but that is well is a syntax not 
to be found in any gradle docs.

Any help?

Thanks,
Roger

Reply via email to