Hi all,
I have a question. We have a running multi project build which creates war files. The war file needs to be customized a bit. I managed it with directly modifying the war task like:
war {
from(...) // and so on
}
in that script we have an import of a script which manages the publishing via maven-publishing plugin:
apply plugin: 'maven-publish'
....
publishing {
publications {
mavenWar(MavenPublication) {
artifact war
...
}
}
}
So far everything works. Now I’d like to move the customization of that war file into a custom task which overwrites the default war target. Like:
task war(type: War, dependsOn: prepareLanguageFiles, overwrite: true) {
from(...)
...
}
The new war target itself works but the publishing won’t publish the same war file. It publishes the war created by the default war task. I assume it’s because the publishing section is imported before the actual “custom” war task is defined. Something with the configuration time?
Does anyone has an idea how I can make this work?