Search code examples
springpom.xmlspring-cloud

dependecy not found: openfeign


I get the error: Could not find artifact org.springframework.cloud:spring-cloud-openfeign:pom:unknown in central (https://repo.maven.apache.org/maven2)

Here is my pom.xml

<?xml version="1.0" encoding="UTF-8"?>

4.0.0 org.springframework.boot spring-boot-starter-parent 2.4.0 privas.microservice sellcar 0.0.1-SNAPSHOT sellcar Demo project for Spring Boot

<properties>
    <java.version>15</java.version>
    <maven.compiler.target>${java.version}</maven.compiler.target>
    <maven.compiler.source>${java.version}</maven.compiler.source>
    <spring-cloud.version>Hoxton.SR8</spring-cloud.version>
</properties>

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


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

    <dependency>
        <groupId>org.projectlombok</groupId>
        <artifactId>lombok</artifactId>
        <optional>true</optional>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
    </dependency>
</dependencies>

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
        </plugin>
    </plugins>
</build>
It is a module project if that information is needed. Does anyone know why maven doesn't find openfeign? It also doesnt work with any other spring cloud dependency.

Solution

  • org.springframework.cloud has 2 packages:

    • spring-cloud-starter-openfeign
    • spring-cloud-openfeign-core

    but not spring-cloud-openfeign