Im a newbie to Gradle. Im attempting to compile the integration tests using a classpath that is used by the main compile task. The errors I receive are indicative of the fact that the compile classpath is not being set correctly, any advice? Here is my gradle file
apply plugin: ‘java’ apply plugin: ‘eclipse’
sourceCompatibility = 1.7 version = rootProject.version jar {
manifest {
attributes ‘Implementation-Title’: rootProject.modname, ‘Implementation-Version’: rootProject.version
} }
repositories {
mavenCentral()
ivy {
// URL can refer to a local directory
url “local-repo”
} }
configurations{
integTest.extendsFrom testCompile }
sourceSets{
integTest{
java.srcDir file(‘src/integration-tests/java’)
compileClasspath= sourceSets.main.output + sourceSets.test.output + configurations.integTest
} }
dependencies {
compile group: ‘javax.activation’, name: ‘activation’, version: ‘1.1’
compile group: ‘axis’, name: ‘axis’, version: ‘1.4’
//compile group: ‘commons-collections’, name: ‘commons-collections’, version: ‘3.2’
compile group: ‘commons-discovery’, name: ‘commons-discovery’, version: ‘0.2’
compile group: ‘commons-logging’, name: ‘commons-logging’, version: ‘1.0.2’
compile group: ‘axis’, name: ‘axis-jaxrpc’, version: ‘1.4’
compile group: ‘log4j’, name: ‘log4j’, version: ‘1.2.16’
compile group: ‘javax.mail’, name: ‘mail’, version: ‘1.4’
compile group: ‘axis’, name: ‘axis-wsdl4j’, version: ‘1.5.1’
compile group: ‘javax.servlet’, name: ‘javax.servlet-api’, version: ‘3.1.0’
compile group: ‘commons-fileupload’, name: ‘commons-fileupload’, version:‘1.3’
compile fileTree(dir: ‘local-repo’, include: ‘*.jar’)
testCompile group: ‘junit’, name: ‘junit’, version: ‘4.11’ }
test { }
uploadArchives {
repositories {
flatDir {
dirs ‘repos’
}
} }