I need to deploy a .war file to Tomcat but before I do, I need to configure some of the files in the .war file. Because of this need, I can not simply copy the .war file to the Tomcat \webapps folder. Here is what I would like to do:
1. Determine the destination installation path for the web application. This will be the Tomcat installation location followed by "\webapps". The user will provide this information.
2. Create a temporary folder that I can temporarily copy the .war file to. I am assuming that I can create a temporary folder via PowerShell.
3. Copy the .war file into the temporary folder.
I am not sure how I get the .war file from Advanced Installer to the temporary folder as I do not want Advanced Installer to actually install the .war file; I will do that programmatically (See Step #7 below).
4. Using PowerShell, unzip the .war file into the temporary folder.
5. As I mentioned, I need to configure some of the files contained in the .war file. Using the extract files in the temporary folder, perform the necessary file updates/manipulation to support the web application. I'm assuming I can do the necessary file manipulation using PowerShell.
6. Using PowerShell, compress all files and folders in the temporary folder back into a .war file; excluding the original .war file from Step #3 above.
7. Using PowerShell, copy the new .war file to the destination installation path. Tomcat will see the new .war file and attempt to deploy the web application.
Any suggestions or examples on how I might do this would be appreciated.
Thanks in advance!
Todd Scheuerman
FOLLOW US
Get the latest news in Application Packaging