【问题标题】:How to solve Spring boot Porm error on "Parent" tag?如何解决 \"Parent\" 标签上的 Spring boot Porm 错误?
【发布时间】:2023-01-23 12:07:31
【问题描述】:

我只是从 spring initializer 下载应用程序并将 maven 项目导入到 eclipse。

我有这个错误:

错误:

Multiple markers at this line
- Non-resolvable parent POM for xxxxx:PasswordSafer:0.0.1-SNAPSHOT: org.springframework.boot:spring-boot-starter-parent:pom:2.6.3 failed to transfer from https://repo.maven.apache.org/maven2 during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.6.3 from/to central (https://repo.maven.apache.org/maven2): Connection reset
- Project build error: Non-resolvable parent POM for xxxxxxx:PasswordSafer:0.0.1-SNAPSHOT: org.springframework.boot:spring-boot-starter-parent:pom:2.6.3 failed to transfer from https://repo.maven.apache.org/maven2 during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.6.3 from/to central (https://repo.maven.apache.org/maven2): Connection reset and 'parent.relativePath' points at no local POM

我尝试更新 maven --> “更新 Maven 项目”(使用快照/发布的强制更新)。但仍然是错误。

【问题讨论】:

    标签: java spring-boot maven


    【解决方案1】:

    您可以尝试此选项:

    mvn clean install -U
    

    您还可以从 Maven 配置您的 setting.xml 以使用此值:

    <updatePolicy>always</updatePolicy>
    

    见此链接:https://maven.apache.org/pom.html#Repositories

    【讨论】:

      【解决方案2】:

      问题是防火墙,它阻止了 Maven 项目的更新。

      【讨论】:

        【解决方案3】:

        我有这个错误,但我发现最好的解决方案是从 c 驱动器的用户文件夹中删除 .p2 文件: enter image description here

        【讨论】:

          猜你喜欢
          • 2019-07-30
          • 2021-12-07
          • 1970-01-01
          • 2020-12-16
          • 1970-01-01
          • 2021-10-12
          • 1970-01-01
          • 2018-11-02
          • 2020-07-30
          相关资源
          最近更新 更多