Bartosz_76
Bartosz_76

Reputation: 87

Maven doesn't see Spring dependencies

I have a problem with Maven refusing to recognize any Spring dependencies. Even though in the POM, everything seems to be correct (nothing highlighted), if I try to compile the app, it throws an error with a message:

java: package org.springframework.boot does not exist

Also, no annotations work, my IDE simply does not see any dependency it's given and if I try to resolve it by "add dependency"... literally nothing happens. POM itself is fine, because the rest of my team encounter no problems. I have environment variables set with correct paths and options found at Settings -> Build -> Build Tools -> Maven are also set as they should be.

This is my POM (chosen fragments):

<parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.2.5.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <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>
    <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-stream</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-stream-binder-kafka</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.kafka</groupId>
            <artifactId>spring-kafka</artifactId>
        </dependency>

Upvotes: 1

Views: 1880

Answers (0)

Related Questions