NEXUS通过docker方式进行安装
settings.xml配置
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository>repository地址</localRepository>
<mirrors>
<mirror>
<id>aaa</id>
<name>aaa</name>
<mirrorOf>aaa</mirrorOf>
<url>http://x.x.x.x:xxxx/repository/maven-public</url>
</mirror>
<!--此处需要排除掉rjyun-->
<mirror>
<id>alimaven</id>
<mirrorOf>*,!aaa</mirrorOf>
这里需要注意 设置成*以后 会优先走这里 需要排除掉aaa 再设置成mirror 否则其他配置无效
<name>Nexus aliyun</name>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
</mirror>
</mirrors>
<servers>
<server>
<id>aaa</id>
<username>admin</username>
<password>xxx</password>
</server>
</servers>
<activeProfiles>
<activeProfile>nexus</activeProfile>
</activeProfiles>
</settings>
上传jar包 需要注意的是连pom.xml一起上传 并且后缀名设置为pom 否则可能会报错
pom.xml配置
<repositories>
<repository>
<id>rjyun</id>
<name>rjyun</name>
<url>http://xxx</url>
</repository>