【问题标题】:Unable to add maven dependency for Apache Commons-csv无法为 Apache Commons-csv 添加 Maven 依赖项
【发布时间】:2020-08-11 11:08:03
【问题描述】:

大家好,我正在尝试为我的 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>

【问题讨论】:

标签: java spring spring-boot maven maven-plugin


【解决方案1】:

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

【讨论】:

    【解决方案2】:

    右键单击您的项目文件夹 -> Maven -> 重新加载项目。

    对我有用

    【讨论】:

      【解决方案3】:

      右键单击项目并按照此导航 project->maven->reimport 对我有用

      【讨论】:

        猜你喜欢
        • 2016-09-15
        • 2012-12-04
        • 2016-07-22
        • 2014-02-19
        • 1970-01-01
        • 2012-07-21
        • 1970-01-01
        • 2013-11-07
        • 2019-06-07
        相关资源
        最近更新 更多