-pl yshop-app,yshop-admin -am clean package
执行sell
#!/bin/bash
Project_name=yshop-app
echo $Project_name
pid=$(ps -ef | grep java| grep $Project_name|awk -F '[ ]+' '{print $2}')
kill -9 $pid
BUILD_ID=dontKillMe
nohup java -jar -Dfile.encoding=UTF-8 yshop-app/target/app.jar -server -Xmx1000m -Xms1000m -Xmn700m -XX:+UseParallelGC &
echo "starting service..."
sleep 20
pid=$(ps -ef | grep java| grep $Project_name|awk -F '[ ]+' '{print $2}')
#echo $pid
if [ -z $pid ];then
echo "启动失败"
exit 1
else
echo $Project_name : $pid "SUCCESS"
fi