上传本地jar包到nexus私服

前端之家收集整理的这篇文章主要介绍了上传本地jar包到nexus私服前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

一、配置setting.xml
1.在maven setting.xml 加入内容
<!--配置可发布用户,两id必须一致 -->
<servers>
<server>
<id>thirdparty</id>
<username>admin</username>
<password>admin123</password>
</server>
<server>
<id>thirdparty</id>
<username>deployment</username>
<password>deployment123</password>
</server>
</servers>
<!--配置使用本地私服 -->
<profiles>
<profile>
<id>nexus</id>
<repositories>
<repository>
<id>public</id>
<name>Local Public Repository</name>
<url>http://localhost:8081/nexus/content/groups/public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>public</id>
<name>Local Public Repository</name>
<url>http://localhost:8081/nexus/content/groups/public/</url>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>

二、命令行上传jar包并打入本地库
1.将本地jar包上传到nexus命令
mvn deploy:deploy-file -DgroupId=com.acts -DartifactId=alipay-sdk-java -Dversion=1.0.0 -Dpackaging=jar -Dfile=C:\xxx.jar -Durl=http://localhost:8081/nexus/content/repositories/thirdparty/ -DrepositoryId=thirdparty

2.将本地jar包打入到本地库命令,在pom文件中即可引入mvninstall:install-file-Dfile=C:\xxx.jar-DgroupId=com.acts-DartifactId=alipay-trade-sdk-Dversion=1.0.0-Dpackaging=jar

猜你在找的XML相关文章