Hi, I have a build file that defines multiple ear artifacts, but only the last one listed in the artifact block is being built.
apply plugin: 'java'
task testJar1(type: Jar) {
baseName = 'TestJar1'
}
task testJar2(type: Jar) {
baseName = 'TestJar2'
}
task testEar1(type: Ear) {
baseName = 'TestEar1'
}
task testEar2(type: Ear) {
baseName = 'TestEar2'
}
artifacts {
archives testJar1
archives testJar2
archives testEar1
archives testEar2
}
-rw-r--r-- 1 user grp 261 Nov 19 22:09 TestEar2.ear
-rw-r--r-- 1 user grp 261 Nov 19 22:09 TestJar1.jar
-rw-r--r-- 1 user grp 261 Nov 19 22:09 TestJar2.jar
I thought the ear task was an extension of the jar task which appears to allow multiple. I know I can create multiple projects for each ear, but curious why this does not work.