上传本地jar包到Nexus

一些第三方提供的SDK,往往在Maven中央仓库是下载不到的,这个时候如果搭建了私服,就可以往上面丢

相关命令如下:

1
mvn deploy:deploy-file -DgroupId=org.budo -DartifactId=mipush_sdk_server -Dversion=2_2_21 -Dpackaging=jar -Dfile=MiPush_SDK_Server_2_2_21.jar -Durl=http://nexus-server:8081/nexus/content/repositories/thirdparty/ -DrepositoryId=snapshots.nexus.ewei.ren

settings.xml 关键配置如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<servers>
<server>
<id>snapshots.nexus.ewei.ren</id>
<username>deployment</username>
<password>12369.</password>
</server>
</servers>

<mirrors>
<mirror>
<id>snapshots.nexus.ewei.ren</id>
<name>nexus-ewei</name>
<url>http://nexus-server:8081/nexus/content/groups/public</url>
<mirrorOf>*</mirrorOf>
</mirror>
</mirrors>

评论

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×