Maven Spring boot and Spring Cloud pom dependency not found

793 views Asked by At

I find this difficult to identify all of sudden CI/CD pipeline broken due to the fact that Spring boot pom is not available anymore at the location.

When I ran the command mvn clean install, I see below two pom are misplaced/not available anymore, which was historically working for 3-4 years till now -

First one -

Downloading: https://repo.spring.io/snapshot/org/springframework/boot/spring-boot-starter-parent/1.3.3.RELEASE/spring-boot-starter-parent-1.3.3.RELEASE.pom

Downloading: https://repo.spring.io/milestone/org/springframework/boot/spring-boot-starter-parent/1.3.3.RELEASE/spring-boot-starter-parent-1.3.3.RELEASE.pom

And second -

Downloading: https://repo.spring.io/snapshot/org/springframework/cloud/spring-cloud-dependencies/Brixton.RELEASE/spring-cloud-dependencies-Brixton.RELEASE.pom

Downloading: https://repo.spring.io/milestone/org/springframework/cloud/spring-cloud-dependencies/Brixton.RELEASE/spring-cloud-dependencies-Brixton.RELEASE.pom

In the pom.xml I have mentioned below dependency -

<dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-parent</artifactId>
                <version>${spring.boot.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-dependencies</artifactId>
                <version>Brixton.RELEASE</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>

    </dependencyManagement>

POM has mention of below repository -

<repositories>
        <repository>
            <id>spring-snapshots</id>
            <name>Spring snapshots</name>
            <url>https://repo.spring.io/snapshot</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>spring-milestones</id>
            <name>Spring milestones</name>
            <url>https://repo.spring.io/milestone</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>

        <repository>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            <id>central</id>
            <name>bintray</name>
            <url>https://jcenter.bintray.com</url>
        </repository>
    </repositories>

Any clue what is happening here ? Hope for the understanding.

Note: The project was built at the time Spring 1.3.3 version was released and we cannot change the version straight away.

1

There are 1 answers

6
GSSwain On BEST ANSWER

Seems you are missing the RELEASE repo

<repository>
    <id>spring-repo</id>
    <name>Spring Repository</name>
    <url>https://repo.spring.io/release</url>
    <snapshots>
       <enabled>false</enabled>
    </snapshots>
</repository>

As per this blog, one should be using the maven central for Spring dependencies. https://repo.spring.io/release can also be blocked in the future.

<repository>
    <id>maven-central</id>
    <name>Maven Centrail</name>
    <url>https://repo1.maven.org/maven2</url>
    <snapshots>
       <enabled>false</enabled>
    </snapshots>
</repository>