Java 具有范围的Maven依赖项<;进口>;不';t从自定义存储库下载
在pom.xml中,我有一个依赖项管理部分Java 具有范围的Maven依赖项<;进口>;不';t从自定义存储库下载,java,maven,dependency-management,Java,Maven,Dependency Management,在pom.xml中,我有一个依赖项管理部分 <dependencyManagement> <dependencies> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-dependencies</
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
org.springframework.cloud
spring云依赖关系
${spring cloud.version}
聚甲醛
进口
以及覆盖central repo.maven路径的自定义存储库。(注意:我知道这不是最佳实践,但这是项目需要。)
中心的
中心的
https://SOME_PATH
因此,我希望所有依赖项都将从自定义存储库下载。但是从maven central下载的spring云依赖项的所有依赖项(其中有很多依赖项,还包含范围导入)
作为一种解决方法,我们在settings.xml中设置了镜像,但我想知道为什么存储库设置不适用于此依赖项
此外,如果我添加了第二个存储库,其中包含一些不存在的id,如“import”或“other”,则会发现一个奇怪的行为。这些依赖项将从自定义存储库下载
<repositories>
<repository>
<id>central</id>
<name>central</name>
<url>https://SOME_PATH</url>
</repository>
</repositories>