Skip to content

Slf4j metada are fetch in each maven commands  #1909

@corentinarnaud

Description

@corentinarnaud

Describe the bug
We use spring-cloud-contract-maven-plugin version 4.0.2

We have a private repo and no acces to othe repo. Since we migrated to spring-cloud 4+. In each maven command the plugin try to fetch slf4j metada :

mvn clean install [INFO] Scanning for projects... [INFO] Downloading from spring-milestones: https://repo.spring.io/milestone/org/slf4j/slf4j-api/maven-metadata.xml [INFO] Downloading from nexus_central: https://nexus:8443/repository/org/slf4j/slf4j-api/maven-metadata.xml [INFO] Downloading from maven-public: https://nexus/repository/maven-public/org/slf4j/slf4j-api/maven-metadata.xml [INFO] Downloading from spring-snapshots: https://repo.spring.io/snapshot/org/slf4j/slf4j-api/maven-metadata.xml [INFO] Downloading from spring-releases: https://repo.spring.io/release/org/slf4j/slf4j-api/maven-metadata.xml [INFO] Downloaded from maven-public: https://nexus/repository/maven-public/org/slf4j/slf4j-api/maven-metadata.xml (3.4 kB at 9.3 kB/s) [INFO] Downloading from maven-restlet: https://maven.restlet.org/org/slf4j/slf4j-api/maven-metadata.xml [INFO] Downloading from sonatype-snapshots: https://oss.sonatype.org/content/repositories/snapshots/org/slf4j/slf4j-api/maven-metadata.xml [INFO] Downloading from netflix-candidates: https://artifactory-oss.prod.netflix.net/artifactory/maven-oss-candidates/org/slf4j/slf4j-api/maven-metadata.xml [WARNING] Could not transfer metadata org.slf4j:slf4j-api/maven-metadata.xml from/to spring-snapshots (https://repo.spring.io/snapshot): transfer failed for https://repo.spring.io/snapshot/org/slf4j/slf4j-api/maven-metadata.xml [WARNING] Could not transfer metadata org.slf4j:slf4j-api/maven-metadata.xml from/to spring-milestones (https://repo.spring.io/milestone): transfer failed for https://repo.spring.io/milestone/org/slf4j/slf4j-api/maven-metadata.xml [WARNING] Could not transfer metadata org.slf4j:slf4j-api/maven-metadata.xml from/to spring-releases (https://repo.spring.io/release): transfer failed for https://repo.spring.io/release/org/slf4j/slf4j-api/maven-metadata.xml [WARNING] Could not transfer metadata org.slf4j:slf4j-api/maven-metadata.xml from/to maven-restlet (https://maven.restlet.org): transfer failed for https://maven.restlet.org/org/slf4j/slf4j-api/maven-metadata.xml [WARNING] Could not transfer metadata org.slf4j:slf4j-api/maven-metadata.xml from/to sonatype-snapshots (https://oss.sonatype.org/content/repositories/snapshots/): transfer failed for https://oss.sonatype.org/content/repositories/snapshots/org/slf4j/slf4j-api/maven-metadata.xml [WARNING] Could not transfer metadata org.slf4j:slf4j-api/maven-metadata.xml from/to netflix-candidates (https://artifactory-oss.prod.netflix.net/artifactory/maven-oss-candidates): transfer failed for https://artifactory-oss.prod.netflix.net/artifactory/maven-oss-candidates/org/slf4j/slf4j-api/maven-metadata.xml [WARNING] org.slf4j:slf4j-api/maven-metadata.xmlfailed to transfer from https://repo.spring.io/snapshot during a previous attempt. This failure was cached in the local repository and resolution will not be reattempted until the update interval of spring-snapshots has elapsed or updates are forced. Original error: Could not transfer metadata org.slf4j:slf4j-api/maven-metadata.xml from/to spring-snapshots (https://repo.spring.io/snapshot): transfer failed for https://repo.spring.io/snapshot/org/slf4j/slf4j-api/maven-metadata.xml

I found that the issue come from the goal generateTest.

Could you fix the version of slf4j ?

Sample
In pom.xml :

    <pluginRepositories>
        <pluginRepository>
            <id>nexus_central</id>
            <name>Nexus Central Mirror</name>
            <url>https://nexus.local:8443/repository/</url>
        </pluginRepository>
    </pluginRepositories>

    <repositories>
        <repository>
            <id>nexus_central</id>
            <name>Nexus Central Mirror</name>
            <url>https://nexus.local:8443/repository/</url>
        </repository>
    </repositories>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-contract-maven-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <testFramework>JUNIT5</testFramework>
                    <packageWithBaseClasses>com.contract.provider</packageWithBaseClasses>
                </configuration>
            </plugin>
        </plugins>
    </build>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions