I’m using this task in order to add twho single files in my war file:
task createDemoWar(type: War, dependsOn: classes) {
archiveName "webapi-demo-${versioning.info.display}.war"
destinationDir = file("$buildDir/dist")
from('scopes') {
include 'demo.persistence.xml'
rename('demo.persistence.xml', 'persistence.xml')
into('src/main/resources/META-INF/')
}
from('scopes') {
include 'configuration.demo.properties'
rename('configuration.demo.properties', 'scope.properties')
into('src/main/resources/')
}
}
After having executed the task, the war doesn’t contain anyone of both ones.
Any ideas?