无法为 Apache Commons-csv 添加 Maven 依赖项

Sud*_*man 1 java spring maven-plugin maven spring-boot

大家好,我正在尝试为我的 Spring Boot 项目添加 Apache commons-csv 版本 1.8 依赖项,但出现以下错误。未找到依赖项“org.apache.commons:commons-csv:1.8”。另外,我正在使用 Java 14。为了供您参考,我还粘贴了我的 pom.xml。

<properties>
    <java.version>14</java.version>
</properties>

<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-thymeleaf</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
    <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-csv</artifactId>
        <version>1.8</version>
    </dependency>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-devtools</artifactId>
        <scope>runtime</scope>
        <optional>true</optional>
    </dependency>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
        <exclusions>
            <exclusion>
                <groupId>org.junit.vintage</groupId>
                <artifactId>junit-vintage-engine</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
</dependencies>

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
        </plugin>
    </plugins>
</build>
Run Code Online (Sandbox Code Playgroud)

小智 9

对于 Intellij Idea:转到 Maven(右侧)并按“重新导入所有 Maven 项目”。