echo off

set version=1.0.0
set env=simulation
set base_path=E:\project\demo
set dest_path=E:\deploy\demo

echo 基础包install 开始

SET lenInstall=3

SET pkgLib[0]=lib1
SET pkgLib[1]=lib2
SET pkgLib[2]=lib3

SET idx=0

:LoopLib
IF %idx% EQU %lenInstall% GOTO StartSrv

FOR /F "usebackq delims==. tokens=1-2" %%I IN (`SET pkgLib[%idx%]`) DO (
cd /d %base_path%\%%J
cmd /k "mvn clean install -Dmaven.test.skip=true&&exit"
echo %%J finished
)

SET /A idx=%idx% + 1

GOTO LoopLib

:StartSrv
echo 基础包install 完成


echo 服务包package 开始

SET lenPkg=3

SET pkgSrv[0]=service1
SET pkgSrv[1]=service2
SET pkgSrv[2]=service3

SET idx=0

:LoopSrv
IF %idx% EQU %lenPkg% GOTO Finished

FOR /F "usebackq delims==. tokens=1-2" %%I IN (`SET pkgSrv[%idx%]`) DO (
cd /d %base_path%\%%J
cmd /k "mvn clean package -Dmaven.test.skip=true -P%env%&&exit"
cd target
cp *%version%.* %dest_path%\
ECHO %%J finished
)

SET /A idx=%idx% + 1

GOTO LoopSrv

:Finished
echo 服务包package 完成

 

echo on

pause

发表评论

电子邮件地址不会被公开。 必填项已用*标注