Copy to tomcat script

This script will quickly copy an app into tomcat by scanning 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, ‘tomcat’ and ‘app’:

  • The first is asking whether to start/stop tomcat, it takes ‘Y’ or ‘N’ as options
  • The second is asking what to copy to tomcat. It has the options of ‘W’ or ‘C’. ‘W’ means copy the whole war, ‘C’ means copy just the compiled classes

Usage examples:
ct y c will stop/start tomcat and copies just compiled classes
ct n w will not stop/start tomcat and copies the war

NB: all parameters are case insensitive
This script requires the Generic tomcat script found on github here
The script can be found on github here

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: