加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
package.bat 1.26 KB
一键复制 编辑 原始数据 按行查看 历史
zhangzhuo 提交于 2022-09-17 16:46 . 修改打包文件
REM windows package
REM package
::如果不需要进行maven打包, 则使用 REM 注释掉该行
::
::call mvn clean install -Dmaven.test.skip=true -P prod
REM del dist
rmdir dist /s /q
REM create dist
mkdir dist
mkdir dist\plugins
REM copy main program and config
xcopy example-main\target\example-main-*-repackage.jar dist /s /i
xcopy example-main\src\main\resources\application-prod.yml dist /s
xcopy example-main\target\lib\* dist\lib /y /e /i /q
REM copy plugin and config
xcopy example-plugins-basic\example-basic-1\target\*-repackage.jar dist\plugins /s
xcopy example-plugins-basic\example-basic-2\target\example-basic-2-1.0.0-SNAPSHOT-repackage dist\plugins\example-basic-2-1.0.0-SNAPSHOT-repackage /e /i /q
xcopy example-plugins-db\example-jpa\target\jpa-example-plugin-1.0.0-repackage dist\plugins\jpa-example-plugin-1.0.0-repackage /e /i /q
xcopy example-plugins-db\example-mybatis-plus\target\*-repackage.zip dist\plugins /s
::xcopy example-plugins-cloud\example-plugin-cloud-nacos\target\*-repackage.jar dist\plugins /s
REM copy bin
xcopy bin\* dist\ /s
cd dist
REM run main
rename example-main-*-repackage.jar example.jar
rename application-prod.yml application.yml
start explorer .
:: 运行命令为: java -jar example.jar --spring.config.location=application.yml
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化