2020-06-08—Maven批量打包jar到本地仓库

Maven批量打包jar到本地仓库

新建bat脚本,右键管理员运行

@echo off
@echo Finding Directory...
@echo The current directory is:%cd%
set localdir=%cd%

@echo build bcprov-jdk13-143...
call mvn install:install-file -Dfile=%localdir%/bcprov-jdk13-143-1.0.0.jar -DgroupId=cn.bytd.single -DartifactId=bcprov-jdk13-143 -Dversion=1.0.0 -Dpackaging=jar

@echo build commons-codec-1.3-1...
call mvn install:install-file -Dfile=%localdir%/commons-codec-1.3-1.0.0.jar -DgroupId=cn.bytd.single -DartifactId=commons-codec-1.3-1 -Dversion=1.0.0 -Dpackaging=jar

@echo build commons-httpclient-3.1...
call mvn install:install-file -Dfile=%localdir%/commons-httpclient-3.1-1.0.0.jar -DgroupId=cn.bytd.single -DartifactId=commons-httpclient-3.1 -Dversion=1.0.0 -Dpackaging=jar

@echo build commons-logging-1.1...
call mvn install:install-file -Dfile=%localdir%/commons-logging-1.1-1.0.0.jar -DgroupId=cn.bytd.single -DartifactId=commons-logging-1.1 -Dversion=1.0.0 -Dpackaging=jar

@echo build IAS_SDK_2.1_JDK13...
call mvn install:install-file -Dfile=%localdir%/IAS_SDK_2.1_JDK13-1.0.0.jar -DgroupId=cn.bytd.single -DartifactId=IAS_SDK_2.1_JDK13 -Dversion=1.0.0 -Dpackaging=jar

@echo build IAS_SDK_2.2.0_JDK13...
call mvn install:install-file -Dfile=%localdir%/IAS_SDK_2.2.0_JDK13-1.0.0.jar -DgroupId=cn.bytd.single -DartifactId=IAS_SDK_2.2.0_JDK13 -Dversion=1.0.0 -Dpackaging=jar

@echo build J2EE_Agent_2_2_1_JDK16...
call mvn install:install-file -Dfile=%localdir%/J2EE_Agent_2_2_1_JDK16-1.0.0.jar -DgroupId=cn.bytd.single -DartifactId=J2EE_Agent_2_2_1_JDK16 -Dversion=1.0.0 -Dpackaging=jar

@echo build jit-cinas-commons-1000-jdk13...
call mvn install:install-file -Dfile=%localdir%/jit-cinas-commons-1000-jdk13-1.0.0.jar -DgroupId=cn.bytd.single -DartifactId=jit-cinas-commons-1000-jdk13 -Dversion=1.0.0 -Dpackaging=jar

@echo build jit-cinas-saml11-1000-jdk13...
call mvn install:install-file -Dfile=%localdir%/jit-cinas-saml11-1000-jdk13-1.0.0.jar -DgroupId=cn.bytd.single -DartifactId=jit-cinas-saml11-1000-jdk13 -Dversion=1.0.0 -Dpackaging=jar

@echo build junit-4.8.1...
call mvn install:install-file -Dfile=%localdir%/junit-4.8.1-1.0.0.jar -DgroupId=cn.bytd.single -DartifactId=junit-4.8.1 -Dversion=1.0.0 -Dpackaging=jar

@echo build log4j-1.2.14...
call mvn install:install-file -Dfile=%localdir%/log4j-1.2.14-1.0.0.jar -DgroupId=cn.bytd.single -DartifactId=log4j-1.2.14 -Dversion=1.0.0 -Dpackaging=jar

@echo build resolver...
call mvn install:install-file -Dfile=%localdir%/resolver-1.0.0.jar -DgroupId=cn.bytd.single -DartifactId=resolver -Dversion=1.0.0 -Dpackaging=jar

@echo build xalan...
call mvn install:install-file -Dfile=%localdir%/xalan-1.0.0.jar -DgroupId=cn.bytd.single -DartifactId=xalan -Dversion=1.0.0 -Dpackaging=jar

@echo build xercesImpl...
call mvn install:install-file -Dfile=%localdir%/xercesImpl-1.0.0.jar -DgroupId=cn.bytd.single -DartifactId=xercesImpl -Dversion=1.0.0 -Dpackaging=jar

@echo build xml-apis...
call mvn install:install-file -Dfile=%localdir%/xml-apis-1.0.0.jar -DgroupId=cn.bytd.single -DartifactId=xml-apis -Dversion=1.0.0 -Dpackaging=jar

@echo build xmlsec-1.3.0...
call mvn install:install-file -Dfile=%localdir%/xmlsec-1.3.0-1.0.0.jar -DgroupId=cn.bytd.single -DartifactId=xmlsec-1.3.0 -Dversion=1.0.0 -Dpackaging=jar

@echo complete!
pause

【注意此文件要和jar在同一文件夹】
如图:
image.png

发布于

2020-06-08

更新于

2022-03-25

许可协议

评论

:D 一言句子获取中...

加载中,最新评论有1分钟缓存...