1

In pom.xml I have a dependency management section.

  <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>

And custom repository that overrides path to central repo.maven. (Note: I know it's not a best practice but it's a project need.).

 <repositories>
        <repository>
            <id>central</id>
            <name>central</name>
            <url>https://SOME_PATH</url>
        </repository>
    </repositories>

So I expect that all dependency will be download from the custom repository. But all dependency from spring-cloud-dependencies (inside are a lot of dependency with scope import also) downloaded from maven central.

As a workaround, we setup mirror in settings.xml but I want to knot why repository settings don't work for this dependency.

Also, I found a strange behavior if I add a second repository with some unexisting id like 'import' or 'other' those dependency will be downloaded from the custom repository.

seltsam
  • 11
  • 1

0 Answers0