As posted previously, using the following to create an ear file I get the war
file included but nothing else (the jars on the classpath are not being
added).
task ear(dependsOn: 'war', type: Zip) {
archiveName = 'myApp.ear'
from war.archivePath
// include the jars from the runtime classpath
from sourceSets.main.runtimeClasspath.collect { it.isFile() }
}
In the end i created a task to call the Ant ear task as follows:
task createEar(dependsOn: 'war') << {
ant.ear(earfile: "$buildDir/libs/dbUpgrade.ear", appxml:
"application.xml") {
fileset(dir: "$buildDir/libs", includes: "*.war")
fileset(dir: "$rootDir/../common/lib" , includes: "log4j.jar
ProgressOE10openedge.jar ProgressOE10pool.jar")
fileset(dir: "$rootDir/../uwm/lib" , includes: "isorelax.jar
msv.jar dom4j-full.jar oisServerUtils.jar oisServerExtensions.jar")
ant.manifest() {
attribute(name: "Organisation", value: "XXX Information
Systems Ltd.")
}
}
}
assemble.dependsOn createEar
This works, but I have a few questions:
- was there something wrong with the zip task? Why weren't my jars getting
included?
- will the prioduction of ear files become a standard task like war? If not
can you please put some examples of creating with a zip task in the
documentation
- I want to limit the jars included to a subset of jars in the classpath but
couldn't figure out the syntax, is there a way to do this? I ended up using
filesets with with references to build/libs directories or other projects.
Thanks.
--
View this message in context:
http://gradle.1045684.n5.nabble.com/Dependancy-error-with-EAR-task-tp3261740p3270807.html
Sent from the gradle-user mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email