上传本地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

相关文章

php输出xml格式字符串
J2ME Mobile 3D入门教程系列文章之一
XML轻松学习手册
XML入门的常见问题(一)
XML入门的常见问题(三)
XML轻松学习手册(2)XML概念