[GRADLE-2496] Forcing a module version has no effect on generated org.eclipse.wst.common.component Created: 24/Sep/12  Updated: 25/Jan/17  Resolved: 03/Jun/16

Status: Resolved
Project: Gradle
Affects Version/s: None
Fix Version/s: 3.0-milestone-1, 3.0-rc-2

Type: Bug
Reporter: Gradle Forums Assignee: Donát Csikós
Resolution: Fixed Votes: 1


 Description   

I have a multi-project build some projects that depend on hibernate-core 3.6.8-Final, which in turn depends on commons-collections 3.1.

I overrode this transitive dependency with the following in all java projects:

configurations {
all {
resolutionStrategy.force "commons-collections:commons-collections:3.2.1"
}
}

This works fine for all plugins (java, tomcat, war), though it fails to be applied in the case of the eclipse-wtp plugin. The original 3.1 jar is referenced in the generated .settings/org.eclipse.wst.common.component as a dependent-module instead of version 3.2.1.

Thanks for any help!

--David



 Comments   
Comment by Gradle Forums [ 24/Sep/12 ]

Did you do a `cleanEclipse`?

Comment by Gradle Forums [ 24/Sep/12 ]

Yes.

Comment by Gradle Forums [ 24/Sep/12 ]

This reproduces the problem:

apply plugin: "war"
apply plugin: "eclipse-wtp"

repositories {
mavenCentral()
}

dependencies {
compile "org.hibernate:hibernate-core:3.6.8.Final"
}

configurations {
all {
resolutionStrategy.force "commons-collections:commons-collections:3.2.1"
}
}

Creating a JIRA issue.

Comment by Gerhard [ 25/Jan/13 ]

Using the new dependency resolve rules from Gradle 1.4 has the same problem. eclipse-wtp ignores that too. Please fix this ASOP.

configurations.all {
    resolutionStrategy.eachDependency { DependencyResolveDetails details ->
        if (details.requested.group == 'org.springframework') {
            details.useVersion '3.2.0.RELEASE'
        }
    }
}
Comment by Andreas Schmid [ 14/Dec/14 ]

Using Gradle 2.0 I am not able to reproduce this issue. Can you confirm that?

Generated at Wed Jun 30 12:23:32 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.