在Maven项目的根目录下,放置2个bat文件,用来自动发布war包到Tomcat的webapps目录下:
publish-test.bat
@echo off call git pull call mvn clean package -U -Dmaven.test.skip=true cd target XCOPY /y dpdata.war "D:\java\Tomcat9\webapps\" echo "ok"
publish-pro.bat
@echo off call git pull call mvn clean package -U -Dmaven.test.skip=true cd target XCOPY /y dpdata.war "F:\Tomcat 9.0\webapps" echo "ok"