把私有包导入到Nexus中

使用如下命令: mvn deploy:deploy-file -DgroupId=com.jundax -DartifactId=common -Dversion=0.3.171-SNAPSHOT -Dpackaging=jar -Dfile=/root/ common-0.3.171-SNAPSHOT.jar -Durl=https:/...

使用如下命令:


mvn deploy:deploy-file -DgroupId=com.jundax -DartifactId=common -Dversion=0.3.171-SNAPSHOT -Dpackaging=jar -Dfile=/root/ common-0.3.171-SNAPSHOT.jar -Durl=https://public.jundax.com/repository/internal-hosted-snapshot-repository/ -DrepositoryId=nexus

命名执行需要在项目pom.xml 所在目录下执行,需要查找项目pom文件

执行打包的的时候,使用mvn clean deploy -U 打包 -U 为更新 snapshot,要不然不会到 internal-hosted-snapshot-repository/ 库中查找,只会到正常库中查找

-DrepositoryId=nexus      其中 "nexus" 为 maven  setting.xml 中的 <server><id>nexus</id></server>  设置账号密码的 名字

  • 发表于 2021-07-29 19:55
  • 阅读 ( 37 )

你可能感兴趣的文章

相关问题

0 条评论

请先 登录 后评论
石天
石天

437 篇文章

作家榜 »

  1. shitian 662 文章
  2. 石天 437 文章
  3. 每天惠23 33 文章
  4. 小A 29 文章