On 25/11/2011, at 5:15 AM, Russel Winder wrote:

> When I run "gradlew idea" in the GPars source, I end up with a whole
> collection of JUnit jars in the class path that the IDEA project ends up
> having:
> 
> 
>            <orderEntry type="module-library" exported="">
>              <library>
>                <CLASSES>
>                  <root 
> url="jar:///home/users/russel/.gradle/caches/artifacts-4/junit/junit/c12498cf18507aa6433a94eb7d3e77d5/jars/junit-4.8.1.jar!/"/>
>                </CLASSES>
>                <JAVADOC/>
>                <SOURCES>
>                  <root 
> url="jar:///home/users/russel/.gradle/caches/artifacts-4/junit/junit/c12498cf18507aa6433a94eb7d3e77d5/sources/junit-4.8.1-sources.jar!/"/>
>                </SOURCES>
>              </library>
>            </orderEntry>
> 
>            <orderEntry type="module-library" scope="TEST">
>              <library>
>                <CLASSES>
>                  <root 
> url="jar:///home/users/russel/.gradle/caches/artifacts-4/junit/junit/c12498cf18507aa6433a94eb7d3e77d5/jars/junit-4.10.jar!/"/>
>                </CLASSES>
>                <JAVADOC/>
>                <SOURCES>
>                  <root 
> url="jar:///home/users/russel/.gradle/caches/artifacts-4/junit/junit/c12498cf18507aa6433a94eb7d3e77d5/sources/junit-4.10-sources.jar!/"/>
>                </SOURCES>
>              </library>
>            </orderEntry>
> 
>            <orderEntry type="module-library" scope="TEST">
>              <library>
>                <CLASSES>
>                  <root 
> url="jar:///home/users/russel/.gradle/caches/artifacts-4/junit/junit-dep/c12498cf18507aa6433a94eb7d3e77d5/jars/junit-dep-4.9.jar!/"/>
>                </CLASSES>
>                <JAVADOC/>
>                <SOURCES>
>                  <root 
> url="jar:///home/users/russel/.gradle/caches/artifacts-4/junit/junit-dep/c12498cf18507aa6433a94eb7d3e77d5/sources/junit-dep-4.9-sources.jar!/"/>
>                </SOURCES>
>              </library>
>            </orderEntry>
> 
> The build.gradle has only:
> 
>           testCompile group: 'junit', name: 'junit', version: 
> project.hasProperty('gpars_junitVersion') ? gpars_junitVersion : '4.10'
> 
> So the question is where does the 4.8.1 dependency come from and why is
> it a compile dependency, and why does it override the explicit test
> dependency of 4.10?

The 4.8.1 entry has no scope, and the 4.10 entry has test scope. So I'd guess 
that something in your compile time dependencies is dragging 4.8.1 in. You can 
try 'gradle dependencies' to see what.

You also have test scoped entries for both 4.9 and 4.10. This shouldn't be 
happening. Perhaps something is going wrong with the conflict detection. Are 
you using milestone 6? What do your dependency declarations look like?


--
Adam Murdoch
Gradle Co-founder
http://www.gradle.org
VP of Engineering, Gradleware Inc. - Gradle Training, Support, Consulting
http://www.gradleware.com

Reply via email to