maven-将jar发布致nexus
1.首先需要配置全局的用户名密码
%MAVEN_HOME%/conf/settings.xml 添加如下内容
1 2 3 4 5 |
<server> <id>hz_3rd_repositories</id> <username>hzbigdata</username> <password>9ol.?:P)</password> </server> |
2.在项目中的pom.xml 添加发布管理
1 2 3 4 5 6 |
<distributionManagement> <repository> <id>hz_3rd_repositories</id> <url>http://192.168.1.104:8071/repository/hz_3rd_repositories/</url> </repository> </distributionManagement> |
3.使用 deploy -e 发布jar包
mvn deploy:deploy-file -DgroupId=com.vip.vfc -DartifactId=common -Dversion=1.0.0 -Dpackaging=jar -Dfile=E:\common.jar -Durl=http://localhost:8081/nexus/content/repositories/releases -DrepositoryId=releases
或者这项目下执行脚本
1 2 |
call mvn -X deploy pause |
©版权声明:本文为【翰林小院】(huhanlin.com)原创文章,转载时请注明出处!
发表评论