i want to set the filename of the war task output before it is deployed to repository.
e.g. project name is abc
and originally it would result in
abc-1.0.0-SNAPSHOT.war
But i want that there should be two generated war files with the same content:
def-1.0.0-SNAPSHOT.war
ghi-1.0.0-SNAPSHOT.war
In build.gradle you can set the archive name:
war.archiveName "YOUR_SPECIAL_NAME.war"
gradle reference
Another one, for example:
war {
baseName = 'service'
version = '0.0.1-SNAPSHOT-' + System.currentTimeMillis();
}
task doPack(type: War, dependsOn: []) {
archiveName "ROOT.war"
That worked for me
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With