On 17/02/10 1:51 AM, Rene Groeschke wrote:
Hi there,
In a project (projectA) I added a jar with classifier 'tests' to archive
the tests classes of projectA and add them to archives artifacts to upload
them to my maven repo:
task jarTests(dependsOn:testClasses, type: Jar) {
from sourceSets.test.classesDir
from sourceSets.main.classesDir
classifier = 'tests'
}
artifacts {
archives jarTests
}
In projectB I have compile dependencies to projectA and the tests of
projectB are using helper classes of projectA test classes.
In my build file for projectB I am not able to distinguish between my
projectA-SNAPSHOT.jar and projectA-Snapshot-tests.jar. I tried it with the
following dependencies setup:
compile "com.eads:projectA:2.26-SNAPSHOT"
testCompile "com.eads:projectA:2.26-SNAPSHOT:te...@jar"
running this setup, the helper classes of projectA are not available. It
seems that "testCompile "com.eads:projectA:2.26-SNAPSHOT:te...@jar" isn't
resolved anymore, since it already resolved by compile
"com.eads:projectA:2.26-SNAPSHOT" . Is there an easy way to get this
configuration running?
Are you using ivy or maven repositories?
I can get this to work using an ivy repository. However, you probably want
compile "com.eads:projectA:2.26-snaps...@jar"
otherwise you pick up all the jars in projectA's default configuration,
which includes the test jar.
--
Adam Murdoch
Gradle Developer
http://www.gradle.org
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email