注意linux下面的命令行,要将PATH声明出来
export PATH=/apps/svr/maven/bin:/apps/svr/jdk7/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/apps/svr/phantomjs/bin:/root/bin:/srv/tools:/root/bin
export INPUTRC=/etc/inputrc
export PWD=/apps/dat/yourProjectName
export JAVA_HOME=/apps/svr/jdk7
export LANG=zh_CN.UTF-8
export SHLVL=1
export CLASSPATH=:/apps/svr/jdk7/lib/tools.jar:/apps/svr/jdk7/lib/dt.jar
mvn -version
cd /apps/dat/yourProjectName/
git pull
mvn clean
mvn install
cd /apps/svr/tomcat7/webapps/
cp /apps/svr/tomcat7/webapps/yourProjectName.war /apps/tomcat_bak/yourProjectName$(date +%Y%m%d-%H%M%S).war
rm -rf yourProjectName yourProjectName.war
scp /apps/dat/yourProjectName/target/yourProjectName.war .
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。