简体   繁体   中英

Maven Spring boot and Spring Cloud pom dependency not found

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.

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>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM