GOW

GOW

segunda-feira, 14 de fevereiro de 2022

ERROR - dependencies.dependency.version' for org.springframework.cloud:spring-cloud-starter-netflix-eureka-client:jar is missing.

  dependencies.dependency.version' for org.springframework.cloud:spring-cloud-starter-netflix-eureka-client:jar is missing. @ line 49, column 15

Application : I am building Spring boot application and when i add the dependancy for Eureka, Zuul etc gave me the error

dependencies.dependency.version' for org.springframework.cloud:spring-cloud-starter-netflix-eureka-client:jar is missing. @ line 49, column 15

Reason:
This is beacuse , cannot find in normal repo. we have to tell how to find this.. since belongs to netflix stack.

i added below "dependencyManagement" and "repositories"

<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>
 

 <repositories>
  <repository>
   <id>spring-milestones</id>
   <name>Spring Milestones</name>
   <url>https://repo.spring.io/milestone</url>
   <snapshots>
    <enabled>false</enabled>
   </snapshots>
  </repository>
 </repositories>


you may add the version also if this does not work under "properties"

<properties>
  <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
  <java.version>1.8</java.version>
  <spring-cloud.version>Greenwich.M1</spring-cloud.version>
 </properties>



Nenhum comentário:

Postar um comentário