清除
cd /data/java-project/info-max/clone
rm -rf *
拉取git数据
git clone git@github.com:XXXXXXXXXX.git;
打包
mvn clean install -Dmaven.test.skip=true
kill当前的进程
ps -ef | grep InfoServerSchedule-1.0-SNAPSHOT.jar | grep -v grep | awk '{print $2}' | xargs kill -9
删除正在执行的老包
rm /data/java-project/info-max/run/* -rf
复制新jar包
cp /data/java-project/info-max/clone/info-max/info-max/InfoServerMax/InfoServerSchedule/target/InfoServerSchedule-1.0-SNAPSHOT.jar /data/java-project/info-max/run
启动
java -jar /data/java-project/info-max/run/InfoServerSchedule-1.0-SNAPSHOT.jar &
网友评论