mvn jar包安裝到本地、上傳到遠程倉庫

本地安裝

mvn install:install-file \
-DgroupId=com.xinyartech \
-DartifactId=easyexcel \
-Dversion=1.1.1 \
-Dpackaging=jar \
-Dfile=/root/shell/easyexcel-1.1.1.jar   
  • -DgroupId groupId
  • -DartifactId artifactId
  • -Dversion version
  • -Dpackaging 包類型 jar 或 war
  • -Dclassifier:附屬構建類別,可選值是sources、javadoc。用來上傳sources、javadoc文件。
  • -Dfile 包本地路徑

上傳倉庫

mvn deploy:deploy-file \
-DgroupId=xxx.xxx \
-DartifactId=xxx \
-Dversion=0.0.2 \
-Dpackaging=jar \
-Dfile=D:\xxx.jar \
-Durl=http://xxx.xxx.xxx.xxx:8081/repository/3rdParty/ \
-DrepositoryId=3rdParty
  • -DgroupId groupId
  • -DartifactId artifactId
  • -Dversion version
  • -Dpackaging 包類型 jar 或 war
  • -Dclassifier:附屬構建類別,可選值是sources、javadoc。用來上傳sources、javadoc文件。
  • -Dfile 包本地路徑
  • -Durl 倉庫地址
  • -DrepositoryId 倉庫名稱
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章