maven 通过命令方式上传jar pom文件

1、首先在setting.xml 文件<server> 配置 id 和用户名、密码  假如id:snapshot

 

2、上传pom。文件

mvn deploy:deploy-file -Dfile=XX-0.0.5-SNAPSHOT.pom -DgroupId=com.XX -DartifactId=XX -Dversion=0.0.5-SNAPSHOT -Dpackaging=pom -DrepositoryId=snapshot -Durl=http://nexus-default.k8s.XXXX/snapshot/

 3、上传jar文件

mvn deploy:deploy-file -Dfile=XXX-1.0.0.jar -DgeneratePom=true -DpomFile=XXX-1.0.0.pom -DgroupId=com.XX -DartifactId=XXXX -Dversion=1.0.0 -Dpackaging=jar -DrepositoryId=snapshot -Durl=http://nexus-default.k8s.XXX/snapshot/

posted @ 2022-05-31 17:33  薛大坑  阅读(1043)  评论(0编辑  收藏  举报