I have build script to generate an EJB jar file shown below. The script should include all files (*.xml, *.xmi , *.properties and MANIFEST.MF )from the source folder ejbModule/META-INF and put then in the META-INF directory of the generated jar file. The script currently places the content of the META-INF both at the root level of the jar and within a META-INF folder. How do I prevent the files from being added to the root level.
Content of jar file
META-INF/ META-INF/MANIFEST.MF META-INF/ibm_ejbext.properties META-INF/ejb-jar.xml META-INF/ibm-ejb-jar-bnd.xmi META-INF/ibm-ejb-jar-ext.xmi MANIFEST.MF
ibm_ejbext.properties ejb-jar.xml ibm-ejb-jar-bnd.xmi ibm-ejb-jar-ext.xmi etc …
build.gradle
sourceSets {
main {
java {
srcDir
"../../$project.name/ejbModule"
}
resources {
srcDir
"../../$project.name/ejbModule/META-INF"
}
output.resourcesDir = "$buildDir/classes/main/META-INF"
}
}
dependencies {
compile files ('../../BaseLibrary/lib/was/6.1/plugins/com.ibm.ws.runtime_6.1.0.jar')
compile group:'org.apache.geronimo.specs',name:'geronimo-jpa_3.0_spec',version:'1.1.1'
compile group:'org.apache.openjpa',name:'openjpa',version:'1.2.1'
compile group:'org.apache.geronimo.specs',name:'geronimo-j2ee_1.4_spec',version:'1.1'
testCompile group:'junit',name:'junit',version:'4.8.1'
compile project(':CommonBase')
}