Hi,
we need to patch an existing jar and I noticed that when I comment/uncomment the from() section inside the manifest configuration, our pom.xml generated with the maven-publish plugin are missing their dependencies (or not).
When commenting out the section as in the example all is good. Can anyone give me some hints on whats going wrong here?
//...
configurations {
clientExeJars {
description = 'Contains dependencies needed to build the Windows Client'
transitive = false
}
}
// ...
task patchSomeJar(type: Jar) {
description = 'Takes the original jar and patches it with a splashscreen and a new manifest.'
archiveName = 'some-patched.jar'
destinationDir = file(someCfg.outDir)
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
manifest {
// from(
// configurations.clientExeJars
// .findAll { it.name.matches('some.*\\.jar') }
// .collect { zipTree(it).findAll { it.name == 'MANIFEST.MF' } }
// )
attributes(
"SplashScreen-Image": "splashscreen.png"
)
}
from { configurations.clientExeJars.findAll { it.name.matches('some.*\\.jar') }.collect { zipTree(it) } }
}
// ...