maven指令上传jar到nexus仓库

maven指令上传jar到nexus仓库,第1张

maven指令上传jar到nexus仓库

1、通过maven指令上传

mvn deploy:deploy-file 
-DgroupId=com.json 
-DartifactId=json -Dversion=1.18 -Dpackaging=jar
-Dfile=D:repositorycomjsonjson-1.18.jar
-Durl=http://localhost:8081/repository/releases/ -DrepositoryId=releases

命令中的参数解释:

-DgroupId=com.json                           包路径
-DartifactId=json                             jar包名
-Dversion=1.18                              jar包版本
-Dpackaging=jar                              上传的类型是jar类型
-Dfile=D:repositorycomjsonjson-1.18.jar                jar的本地磁盘位置
-Durl=http://localhost:8081/repository/releases/            远程nexus仓库地址
-DrepositoryId=releases                                       setting.xml文件中配置的ID或者仓库对应的id

1.如果本地上传的是pom需增加参数指定打包形式为pom,默认为jar方式
-Dpackaging=pom

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/zaji/5685196.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-17
下一篇 2022-12-17

发表评论

登录后才能评论

评论列表(0条)

保存