maven + bat 实现快速编译打包模块代码
生活随笔
收集整理的這篇文章主要介紹了
maven + bat 实现快速编译打包模块代码
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
pom.xml
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><groupId>geostack</groupId><artifactId>parent</artifactId><version>2.0.0.0-SNAPSHOT</version><packaging>pom</packaging><modules><module>geostack組件包/geostack-balance-core</module><module>geostack組件包/geostack-balance-haproxy</module><module>geostack組件包/geostack-core</module><module>geostack組件包/geostack-databasegoods</module><module>geostack組件包/geostack-dependence</module><module>geostack組件包/geostack-dictionary</module><module>geostack組件包/geostack-framework</module><module>geostack組件包/geostack-gistools</module><module>geostack組件包/geostack-log</module><module>geostack組件包/geostack-portal</module><module>geostack組件包/geostack-processfactory</module><module>geostack組件包/geostack-proxy</module><module>geostack組件包/geostack-quartz</module><module>geostack組件包/geostack-servicegoods</module><module>獨立運維組件/geostack-soms</module><module>獨立運維組件/geostack-zabbix</module><module>監控組件/geostack-monitor-common</module><module>監控組件/geostack-monitor-zabbix</module><module>監控組件/geostack-zabbix-api</module></modules> </project>?
mvn_clean.bat
@echo off echo 是否進行maven clean操作 pause ::設置PARENT_PATH所在盤符 D: echo 正在設置臨時環境變量 set PARENT_PATH=D:\Nihaorz\Documents\work\綜合運維與獨立運維源代碼 start /max "" %PARENT_PATH% echo PARENT_PATH:%PARENT_PATH% cd %PARENT_PATH% md logs mvn clean > logs\clean_result.txt?
mvn_install.bat
@echo off echo 是否進行maven install操作 pause ::設置PARENT_PATH所在盤符 D: echo 正在設置臨時環境變量 set PARENT_PATH=D:\Nihaorz\Documents\work\綜合運維與獨立運維源代碼 echo PARENT_PATH:%PARENT_PATH% cd %PARENT_PATH% md logs mvn install > logs\install_result.txt?
mvn_deploy.bat
@echo off echo 是否進行maven deploy操作 pause ::設置PARENT_PATH所在盤符 D: echo 正在設置臨時環境變量 set PARENT_PATH=D:\Nihaorz\Documents\work\綜合運維與獨立運維源代碼 echo PARENT_PATH:%PARENT_PATH% cd %PARENT_PATH% md logs mvn deploy > logs\deploy_result.txt?
copy_jar.bat
@echo off echo 是否進行jar包copy操作 pause echo 正在設置臨時環境變量 set PARENT_PATH=D:\Nihaorz\Documents\work\綜合運維與獨立運維源代碼 set JAR_SUFFIX=-2.0.0.0-SNAPSHOT.jar echo PARENT_PATH:%PARENT_PATH% echo JAR_SUFFIX%JAR_SUFFIX% cd %PARENT_PATH% rd /s /q jars md jars\ xcopy %PARENT_PATH%\geostack組件包\geostack-balance-core\target\geostack-balance-core%JAR_SUFFIX% %PARENT_PATH%\jars xcopy %PARENT_PATH%\geostack組件包\geostack-balance-haproxy\target\geostack-balance-haproxy%JAR_SUFFIX% %PARENT_PATH%\jars xcopy %PARENT_PATH%\geostack組件包\geostack-core\target\geostack-core%JAR_SUFFIX% %PARENT_PATH%\jars xcopy %PARENT_PATH%\geostack組件包\geostack-databasegoods\target\geostack-databasegoods%JAR_SUFFIX% %PARENT_PATH%\jars xcopy %PARENT_PATH%\geostack組件包\geostack-dependence\target\geostack-dependence%JAR_SUFFIX% %PARENT_PATH%\jars xcopy %PARENT_PATH%\geostack組件包\geostack-dictionary\target\geostack-dictionary%JAR_SUFFIX% %PARENT_PATH%\jars xcopy %PARENT_PATH%\geostack組件包\geostack-framework\target\geostack-framework%JAR_SUFFIX% %PARENT_PATH%\jars xcopy %PARENT_PATH%\geostack組件包\geostack-gistools\target\geostack-gistools%JAR_SUFFIX% %PARENT_PATH%\jars xcopy %PARENT_PATH%\geostack組件包\geostack-log\target\geostack-log%JAR_SUFFIX% %PARENT_PATH%\jars xcopy %PARENT_PATH%\geostack組件包\geostack-portal\target\geostack-portal%JAR_SUFFIX% %PARENT_PATH%\jars xcopy %PARENT_PATH%\geostack組件包\geostack-processfactory\target\geostack-processfactory%JAR_SUFFIX% %PARENT_PATH%\jars xcopy %PARENT_PATH%\geostack組件包\geostack-proxy\target\geostack-proxy%JAR_SUFFIX% %PARENT_PATH%\jars xcopy %PARENT_PATH%\geostack組件包\geostack-quartz\target\geostack-quartz%JAR_SUFFIX% %PARENT_PATH%\jars xcopy %PARENT_PATH%\geostack組件包\geostack-servicegoods\target\geostack-servicegoods%JAR_SUFFIX% %PARENT_PATH%\jarsxcopy %PARENT_PATH%\獨立運維組件\geostack-soms\target\geostack-soms%JAR_SUFFIX% %PARENT_PATH%\jars xcopy %PARENT_PATH%\獨立運維組件\geostack-zabbix\target\geostack-zabbix%JAR_SUFFIX% %PARENT_PATH%\jarsxcopy %PARENT_PATH%\監控組件\geostack-monitor-common\target\geostack-monitor-common%JAR_SUFFIX% %PARENT_PATH%\jars xcopy %PARENT_PATH%\監控組件\geostack-monitor-zabbix\target\geostack-monitor-zabbix%JAR_SUFFIX% %PARENT_PATH%\jars xcopy %PARENT_PATH%\監控組件\geostack-zabbix-api\target\geostack-zabbix-api%JAR_SUFFIX% %PARENT_PATH%\jarsstart /max "" %PARENT_PATH%\jars pause?
轉載于:https://www.cnblogs.com/nihaorz/p/7838026.html
總結
以上是生活随笔為你收集整理的maven + bat 实现快速编译打包模块代码的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 最长回文子序列(LPS)
- 下一篇: 线程池2--创建线程