This script will quickly replace the webapp dir of a deployed webapp in tomcat. It scans at your current directory tree for an appropriate artifact.
It will look for a target subdirectory, and will try to find a .war file in it (assumes you’ve build your app with maven).
The script takes two parameters, ‘webapp’ and ‘dir’:
- The first is the name of the webapp deployed in tomcat
- The second is the dir to move into the deployed webapp
ctw myapp mydir will copy mydir into the myapp webapp sitting in tomcat
NB: all parameters are case insensitive
The script can be found on github here