Nautilus scripts for my Tomcat servlet development environment
Creating a new project
Creates the project directory, the directory structures
and the web.xml --A.K.A. Deployment Descriptor (DD):
Deploying the project
The webapps directory before the deployment:
Making sure that the (project) directory is selected, we call the Deploy script:
The webapps directory after the Deploy script was called:
It created the deployment directory structure for our project and copied the web.xml to the correct directory. Classes are also copied from the development to the deployment directories if they exist.
The Scripts
Tomcat>New project
1 #!/bin/sh
2 DIR=`zenity --entry --text="Name of project"`
3 mkdir -p $DIR/{etc,lib,src,classes,web}
4 cp ~/lib/vim/tpl/dd $DIR/etc/web.xml
Tomcat>Deploy
1 #!/bin/sh
2 mkdir -p /usr/local/tomcat/webapps/"$@"/WEB-INF/{classes,lib}
3 cp "$@"/etc/web.xml /usr/local/tomcat/webapps/"$@"/WEB-INF/web.xml
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home