spring-cloud / spring-cloud-release

Spring Cloud Release Train - dependency management across a wide range of Spring Cloud projects.
http://projects.spring.io/spring-cloud
Apache License 2.0
877 stars 181 forks source link

Hoxton.release-Wrong dependency-spring-cloud-task-dependencies #178

Closed m1ngyuan closed 4 years ago

m1ngyuan commented 4 years ago

Describe the bug Hoxton.release has a dependency error spring-cloud-task-dependencies: 2.2.0.release, but 2.2.0.release relies on spring-cloud-dependencies-parent: 2.2.0.M1. Now spring-cloud-task- dependencies has been updated to 2.2.1.RELEASE

m1ngyuan commented 4 years ago

@spring-buildmaster

marcingrzejszczak commented 4 years ago

We're on it

m1ngyuan commented 4 years ago

On this issue, I prepared a demo, STEP1: checkout demo: https://github.com/m1ngyuan/hoxton-release-demo STEP2: run : mvnw clean package Errors will be reported during the compilation of the project. The console error information is: Failure to find org.springframework.cloud:spring-cloud-dependencies-parent:pom:2.2.0.M1 in https://repo.spring.io/release/ was cached in the local repository, resolution will not be reattempted until the update interval of spring-release has elapsed or updates are forced

marcingrzejszczak commented 4 years ago

Can you try setting the spring-cloud-task.version property to 2.2.1.RELEASE?

m1ngyuan commented 4 years ago

Can you try setting the spring-cloud-task.version property to 2.2.1.RELEASE?

Did not

marcingrzejszczak commented 4 years ago

I understand, so can you set it, try again and report of it helps?

m1ngyuan commented 4 years ago

I have updated demo, but the problem still exists. You can update it

2.2.1.RELEASE
marcingrzejszczak commented 4 years ago

as a workaround try such a setup

<?xml version="1.0" encoding="UTF-8"?>
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.2.1.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.example</groupId>
    <artifactId>hoxton-release-demo</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>hoxton-release-demo</name>
    <description>Demo project for Spring Boot</description>

    <properties>
        <java.version>1.8</java.version>
        <spring-boot.version>2.2.1.RELEASE</spring-boot.version>
        <spring-cloud-task.version>2.2.1.RELEASE</spring-cloud-task.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-task</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.junit.vintage</groupId>
                    <artifactId>junit-vintage-engine</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-dependencies</artifactId>
                <version>${spring-boot.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-task-dependencies</artifactId>
                <version>${spring-cloud-task.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-dependencies</artifactId>
                <version>Hoxton.RELEASE</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <repositories>
    <repository>
        <id>spring-release</id>
        <url>https://repo.spring.io/release/</url>
        <releases>
            <enabled>true</enabled>
        </releases>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
    </repository>
    </repositories>

</project>
m1ngyuan commented 4 years ago

as a workaround try such a setup

<?xml version="1.0" encoding="UTF-8"?>
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.2.1.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.example</groupId>
    <artifactId>hoxton-release-demo</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>hoxton-release-demo</name>
    <description>Demo project for Spring Boot</description>

    <properties>
        <java.version>1.8</java.version>
        <spring-boot.version>2.2.1.RELEASE</spring-boot.version>
        <spring-cloud-task.version>2.2.1.RELEASE</spring-cloud-task.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-task</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.junit.vintage</groupId>
                    <artifactId>junit-vintage-engine</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-dependencies</artifactId>
                <version>${spring-boot.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-task-dependencies</artifactId>
                <version>${spring-cloud-task.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-dependencies</artifactId>
                <version>Hoxton.RELEASE</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <repositories>
    <repository>
        <id>spring-release</id>
        <url>https://repo.spring.io/release/</url>
        <releases>
            <enabled>true</enabled>
        </releases>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
    </repository>
    </repositories>

</project>

Maybe it doesn't solve the problem. Now I can only solve the problem by updating the contents of the local file spring-cloud-task-dependencies-2.2.0.RELEASE.pom; change the parent of the POM file to

<parent>
      <artifactId>spring-cloud-dependencies-parent</artifactId>
      <groupId>org.springframework.cloud</groupId>
      <version>2.2.0.RELEASE</version>
      <relativePath />
  </parent>
sabareeshkkanan commented 4 years ago

We are not even using task and its breaking because of milestone parent is used in task.2.2.0.RELEASE Can we please just upgrade to 2.2.1.RELEASE for the task

davidkarlsen commented 4 years ago

Also http://repo1.maven.org/maven2/org/springframework/cloud/spring-cloud-dependencies/ is missing for Hoxton while I find it present in https://repo.spring.io/release/org/springframework/cloud/spring-cloud-dependencies/Hoxton.RELEASE/

marcingrzejszczak commented 4 years ago

Hi everyone! Thank you so much for double checking our release process. Thanks to you we've managed to fix the issues without the need to redo the whole release. Keep up the great work and thank you for being such a great community!