#安装Git

yum install git

#测试是否成功

git -version

#正确

#git version 1.7.1


#配置
git config --global user.name "account"
git config --global user.email emailbox
git config --global http.proxy http://account:password@domain:port
git config --global http.sslverify=false

#克隆仓库
git clone repository

 

#以上是准备工作

#以下是正式部署命令,可以直接替换车shell脚本

 

#进入repository目录

cd repository
#更新仓库

git pull origin master

 

#进入项目目录

cd project

#maven编译打包

mvn clean package

#关闭tomcat进程

service default stop

#复制war包到tomcat部署目录

cp target/project.war .....tomcat/webapps/project.war

#启动tomcat进程

service default start

 

 

#更新仓库

#关闭tomcat进程

service default stop

相关文章:

  • 2021-07-28
  • 2021-05-09
  • 2021-07-18
  • 2022-12-23
  • 2022-12-23
  • 2021-11-07
  • 2021-09-29
  • 2021-10-26
猜你喜欢
  • 2021-04-05
  • 2023-03-13
  • 2021-11-23
  • 2021-09-04
  • 2021-08-21
  • 2021-10-02
  • 2022-12-23
相关资源
相似解决方案