spring-cloud / spring-cloud-contract

Support for Consumer Driven Contracts in Spring
https://cloud.spring.io/spring-cloud-contract
Apache License 2.0
719 stars 438 forks source link

Maven builds failing with version 3.1.x #2134

Open manish-in-java opened 2 weeks ago

manish-in-java commented 2 weeks ago

Describe the bug I have a Maven POM file with the following content:

<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <dependencyManagement>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-contract-parent</artifactId>
                <version>3.1.9</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-contract-wiremock</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>
</project>

Since Friday, October 4, 2024, Maven builds run as mvn clean package spring-boot:repackage -DskipTests fail with the following errors:

Downloaded from central: https://repo.maven.apache.org/maven2/org/springframework/session/spring-session-bom/2021.2.3/spring-session-bom-2021.2.3.pom (3.1 kB at 441 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/springframework/cloud/spring-cloud-contract-parent/3.1.4/spring-cloud-contract-parent-3.1.4.pom

Downloaded from central: https://repo.maven.apache.org/maven2/org/springframework/cloud/spring-cloud-contract-parent/3.1.4/spring-cloud-contract-parent-3.1.4.pom (23 kB at 3.3 MB/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/springframework/cloud/spring-cloud-build/3.1.4/spring-cloud-build-3.1.4.pom

Downloaded from central: https://repo.maven.apache.org/maven2/org/springframework/cloud/spring-cloud-build/3.1.4/spring-cloud-build-3.1.4.pom (59 kB at 2.1 MB/s)
Downloading from maven-restlet: https://maven.restlet.org/org/springframework/cloud/spring-cloud-commons-dependencies/3.1.4/spring-cloud-commons-dependencies-3.1.4.pom

[WARNING] Checksum validation failed, expected '<!doctype' (REMOTE_EXTERNAL) but is actually 'dffa46b79ae9c63188a412549c67b515d4adb65a' from maven-restlet for https://maven.restlet.org/org/springframework/cloud/spring-cloud-commons-dependencies/3.1.4/spring-cloud-commons-dependencies-3.1.4.pom
[WARNING] Could not validate integrity of download from https://maven.restlet.org/org/springframework/cloud/spring-cloud-commons-dependencies/3.1.4/spring-cloud-commons-dependencies-3.1.4.pom
org.eclipse.aether.transfer.ChecksumFailureException: Checksum validation failed, expected '<!doctype' (REMOTE_EXTERNAL) but is actually 'dffa46b79ae9c63188a412549c67b515d4adb65a'

Apparently, no files can be downloaded from the URL https://maven.restlet.org anymore. All requests are redirected, which cause these errors.

I cannot upgrade Spring Cloud Contract version at the moment so these failing builds are causing a major problem for me.

Sample Please see the Maven POM file snippet and build errors above.

ckim-sch commented 5 days ago

For anyone that are dealing with this, get around the issue by overriding the mirror

<settings>
    <mirrors>
        <mirror>
            <id>central-for-bad-restlet</id>
            <mirrorOf>maven-restlet</mirrorOf>
            <url>https://repo.maven.apache.org/maven2/</url>
        </mirror>
    </mirrors>
</settings>
argomark commented 3 days ago

@ckim-sch do you know where the maven.restlet.org repository definition is coming from?

manish-in-java commented 3 days ago

@argomark - https://github.com/spring-cloud/spring-cloud-contract/blob/ca39fdb021d5df978dd18caf9143a3c998e1bef4/pom.xml#L595