mvn 命令上传 jar 包到 nexus 私仓

上传到 SNAPSHOT 版仓库

mvn deploy:deploy-file -DgroupId=com.xxx -DartifactId=xxx -Dversion=x.x.0-SNAPSHOT -Dpackaging=jar -Dfile=xxx-x.x.0.jar -Durl=http://localhost:8081/repository/maven-snapshots/ -DrepositoryId=仓库唯一标识

这里需要注意的地方

在上传 jar 包到 SNAPSHOT 版仓库时,版本号必须携带 -SNAPSHOT,否则会提示 400 的问题。

posted @ 2021-02-03 16:31  高方也  阅读(205)  评论(0编辑  收藏  举报