Maven打包腳本


腳本文件需注意編碼格式,Windows下是ANSI格式的,用開發工具打開看到可能是亂碼的,可以用notepad++或其它工具編輯

@echo off
::cd %~dp0表示回到腳本文件所在目錄 :begin
echo =====================請選擇您需要打包的項目===================== echo 0 退出系統 echo 1 backend echo 2 demo echo 3 graphic set/p a=請選擇對應的數字: if "%a%"=="1" goto :backend if "%a%"=="2" goto :demo if "%a%"=="3" goto :graphic if "%a%"=="0" goto :end echo\ echo 輸入的值有誤,請重新輸入 echo\ goto :begin #backend項目 :backend ::項目根目錄 cd ../ ::項目依賴模塊 call mvn clean install -Dmaven.test.skip=true ::容器所在目錄 cd SAND-WebApplication/backendApp ::休眠1s類似於Linux的sleep 1s ping -n 1 127.0.0.1>nul ::打包成功之后打開target目錄 call mvn clean install && explorer target ::回到項目根目錄 cd ../ pause goto :begin #demo項目 :demo ::項目根目錄 cd ../ ::項目依賴模塊 call mvn clean install -Dmaven.test.skip=true ::容器所在目錄 cd SAND-WebApplication/demoApp ::休眠1s類似於Linux的sleep 1s ping -n 1 127.0.0.1>nul ::打包並成功之后打開target目錄(cls是清除當前界面的打包信息) call mvn clean install -Dmaven.test.skip=true && cls && explorer target ::回到項目根目錄 cd ../ pause goto :begin #graphic項目 :graphic ::項目根目錄 cd ../ ::項目依賴模塊 call mvn clean install -Dmaven.test.skip=true ::容器所在目錄 cd SAND-WebApplication/graphicApp ::休眠1s類似於Linux的sleep 1s ping -n 1 127.0.0.1>nul ::打包並成功之后打開target目錄(cls是清除當前界面的打包信息) call mvn clean install -Dmaven.test.skip=true && cls && explorer target ::回到項目根目錄 cd ../ pause goto :begin :end exit

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM