入职新公司后,需要从公司私服上面下载jar包,在setting文件中添加
<mirror>
<id>nexusXu</id>
<name>mvnrepository</name>
<url>http://****/</url>
<mirrorOf>central</mirrorOf>
</mirror>
镜像配置,update若干次也没有jar包也没有下载成功,最后又添加远程仓库配置 <profile>
<id>nexus</id>
<repositories>
<repository>
<id>nexus_public</id>
<url>http://****/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>nexus_public</id>
<url>http://****/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>nexus</activeProfile>
</activeProfiles>后,update才下载jar包成功