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
Advertisement