我想从maven镜像下载春土生依赖项,因为它不在我的第三方镜像中,我试图通过在我的settings.xml文件中包含maven镜像来实现它,但是它不起作用。
Settings.xml文件-
<?xml version="1.0" encoding="UTF-8"?>
<settings>
<mirrors>
<mirror>
<id>artifactory</id>
<mirrorOf>*</mirrorOf>
<url>https://thirdparty.com/artifactory</url>
</mirror>
<mirror>
<id>MavenCentral</id>
<url>https://repo.maven.apache.org/maven2</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
<profiles>
<profile>
<id>artifactory</id>
<repositories>
<repository>
<id>central</id>
<url>http://central</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>MavenCentral</id>
<url>https://repo.maven.apache.org/maven2/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>http://central</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>artifactory</activeProfile>
</activeProfiles>
</settings>我增加了这种依赖性-
<dependency>
<groupId>org.springframework.experimental</groupId>
<artifactId>spring-native</artifactId>
<version>0.9.2</version>
</dependency>问题-不能解决org.springframework.experimental:spring-native:0.9.2如何解决这个问题?
发布于 2021-04-27 07:31:35
当您使用<mirrorof>*<mirrorof>时,您实际上覆盖了所有其他镜像和存储库定义。若要将存储库从镜像中排除在外,请使用
*,!otherrepo
https://stackoverflow.com/questions/67278644
复制相似问题