To generate an Exploded war for play framework inorder to create custom web.xml file

396 views Asked by At

How can I generate Exploded War of my Play Framework app ?, because I would like to customize my web.xml file before running the play war command ... I am trying to install JavaMelody for my app I have searched to install but it is answered that we have to change the web.xml in the war file, I dono how it is possible to make edit a war file, yes we can extract it and edit but how to generate again a war file with those extracted files, So I searched about Custom web.xml in play framework documentation Custom web.xml and I don't know how to take an exploded war.

1

There are 1 answers

0
gyamana On

If you have your web.xml file sitting in as specified in the Play! help link you have provided:

your_project/war/web.xml

And you run on your project:

play war -o some_directory

This will produce an exploded war at the location some_directory.

As for customising the web.xml file, you can include the file as part of your repository if you do not need to change the contents of the file at build time. If you do need to dynamically change the web.xml contents at build time, I would suggest adding a step in your build script.