6

I am trying to upgrade my spring boot version from 2.1.5.RELEASE to 2.5.1, so I have changed the spring cloud version from Greenwich.RELEASE to 2020.0.3 according to release train Spring Boot compatibility for spring cloud. I am also using spring-cloud-starter-netflix-zuul and spring-cloud-starter-netflix-ribbon in my project. The issue I am facing is when I build the maven, I'm getting error as follows

[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] 'dependencies.dependency.version' for org.springframework.cloud:spring-cloud-starter-netflix-zuul:jar is missing. @ com.xx.xxx.xxx:[unknown-version], C:\Users\xx\pom.xml, line xx, column xx
[ERROR] 'dependencies.dependency.version' for org.springframework.cloud:spring-cloud-starter-netflix-ribbon:jar is missing. @ com.xx.xxx.xxxh:[unknown-version], C:\Users\xx\pom.xml, line xx, column xx

My pom file is as follows

<parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.5.1</version>
    </parent>
    <repositories>
    </repositories>
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-dependencies</artifactId>
                <version>2020.0.3</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-netflix-zuul</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-netflix-ribbon</artifactId>
        </dependency>
...

could anyone help to resolve this error, Thanks in advance

Bond1705
  • 77
  • 1
  • 8

3 Answers3

17

Numerous Netflix-related modules that were previously in maintenance mode have been removed in Spring Cloud 2020. This includes Ribbon and Zuul which you are using. The Spring Cloud team recommend replacing Ribbon with Spring Cloud Loadbalancer and Zuul with Spring Cloud Gateway.

Andy Wilkinson
  • 108,729
  • 24
  • 257
  • 242
2

spring-cloud and netflix-zuul will work as following versions.

spring-boot-starter-parent: 2.1.3.RELEASE
java.version: 1.8
spring-cloud.version: Greenwich.RELEASE
spring-cloud-starter-netflix-zuul: 2.1.0.RELEASE
spring-cloud-starter-netflix-eureka-client: 2.1.0.RELEASE
jackson-dataformat-xml: 2.9.9
spring-cloud-starter-netflix-eureka-server: 2.1.0.RELEASE
0

Spring removed zuul after 2.4.0 so it better to use below versions for smooth excution.

<parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.1.3.RELEASE</version>
        <relativePath /> <!-- lookup parent from repository -->
    </parent>

<properties>
    <java.version>1.8</java.version>
    <spring-cloud.version>Greenwich.RELEASE</spring-cloud.version>
</properties>


<dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-netflix-zuul</artifactId>
    </dependency>
Baba Fakruddin
  • 139
  • 1
  • 4