I have multiproject build and it builds jars, wars and finally ears.
I added a line for manifests:
subprojects {
tasks.withType(Jar) {
destinationDir = file(dir_dist_libs)
exclude '**/*Test.class’
manifest { from ‘src/META-INF/MANIFEST.MF’ } // this line added
}
}
And now I get a build failure for WAR task:
File ‘/var/lib/jenkins/workspace/Gradle_build/Manager/extwar/src/META-INF/MANIFEST.MF’ does not exist
That manifest line caused this. I am confused, any explanation? The user guide says the WAR plugin disables the default JAR task but it does not say anything related to this kind of situation. Is this desired behaviour?