欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

mvn jar包安装到本地、上传到远程仓库

程序员文章站 2022-05-27 16:58:49
...

本地安装

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 仓库名称