Spring Boot 3.2.0 Eureka Client dependency issue

164 Views Asked by At

I have created a module where I have

plugins {
    id 'java'
    id 'org.springframework.boot' version '3.2.0'
    id 'io.spring.dependency-management' version '1.1.4'
}

group = 'ez.ndvz'
version = '0.0.1-SNAPSHOT'

java {
    sourceCompatibility = '17'
}

repositories {
    mavenCentral()
    maven { url 'https://repo.spring.io/milestone' }
}

ext {
    set('springCloudVersion', "2023.0.0-RC1")
}

dependencies {
    implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-server'
    testImplementation 'org.springframework.boot:spring-boot-starter-test'
    implementation 'org.springframework.cloud:spring-cloud-starter'
}

dependencyManagement {
    imports {
        mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
    }
}

The eureka server works and it starts at it's corresponding port Now I have created 2 more microservices where I deal with the business logic I have annotated the application with @EnableDiscoveryClient and this is the gradle file

plugins {
    id 'java'
    id 'org.springframework.boot' version '3.2.0'
    id 'io.spring.dependency-management' version '1.1.4'
}

group = 'ez.ndvz'
version = '0.0.1-SNAPSHOT'

java {
    sourceCompatibility = '17'
}

configurations {
    compileOnly {
        extendsFrom annotationProcessor
    }
}

repositories {
    mavenCentral()
}

dependencies {
    implementation 'jakarta.validation:jakarta.validation-api:3.0.2'

    implementation group: 'org.springframework.boot', name: 'spring-boot-starter-web', version: '3.2.0'

    implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client'
    implementation group: 'org.springframework.cloud', name: 'spring-cloud-commons', version: '4.1.0'


    implementation 'org.springframework.boot:spring-boot-starter-data-jdbc'
    implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
    implementation 'org.springframework.boot:spring-boot-starter-data-mongodb'
    implementation 'org.springframework.boot:spring-boot-starter-jdbc'
    compileOnly 'org.projectlombok:lombok'


    runtimeOnly 'org.postgresql:postgresql'
    annotationProcessor 'org.projectlombok:lombok'
    testImplementation 'org.springframework.boot:spring-boot-starter-test'
}

tasks.named('test') {
    useJUnitPlatform()
}

I did add the implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client' and I am getting Execution failed for task ':real-estate-service:compileJava'.

Could not resolve all files for configuration ':real-estate-service:compileClasspath'. Could not find org.springframework.cloud:spring-cloud-starter-netflix-eureka-client:. Required by: project :real-estate-service

0

There are 0 best solutions below