2
votes

I'm developing code from the link: https://howtodoinjava.com/spring-cloud/spring-cloud-config-server-git/ and when I updated the Spring Boot version 2.1.2.RELEASE pom.xml is giving me below error.

Project build error: 'dependencies.dependency.version' for org.springframework.cloud:spring-cloud-starter-config:jar is missing.

<dependency>
       <groupId>org.springframework.cloud</groupId>
       <artifactId>spring-cloud-starter-config</artifactId>
</dependency>
1
please show your full configuration - spencergibb
Newbie here - wouldn't it be the case to explicitly add the <version>2.1.2.RELEASE</version> tag beneath the artifactId? - Tiago Cardoso

1 Answers

1
votes

The best way is to add a property to define the version of all your spring-cloud dependencies like this:

<properties>
    ...
    <spring-cloud.version>Hoxton.RELEASE</spring-cloud.version>
</properties>

and next add this dependency managment:

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-dependencies</artifactId>
            <version>${spring-cloud.version}</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>