Replace webapp in deployed tomcat

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

Usage examples:
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

Tagged with: , , ,
Posted in programming, scripts

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: