Make war file for distribution

Hi,

I build my web application (packed in war file) using gradle. Then I want to prepare 2 different war files (production and test server) ready for distribution (mean supporting diverse context.xml files, different log4j configurations and maybe web.xml modification). I’m thinking to unzip the file, copy the new content, modify the web.xml a zip it back into new war.

Maybe there is support for such a thing. Distributions?

Thanks for help, suggestions
Jiri

You could write two different tasks of type WAR (i.e. warTask1, warTask2). In each of these task you would have different from-sources to be copied into. Then you say assemble dependsOn warTask1, warTask2. Finally you could call gradle assemble.

1 Like

Thanks, it works :slight_smile: Easy and simple solution…