使用如下命令:
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> 设置账号密码的 名字
如果觉得我的文章对您有用,请随意打赏。你的支持将鼓励我继续创作!