【问题标题】:Maven build error on upgrading to new Spring Boot version升级到新的 Spring Boot 版本时 Maven 构建错误
【发布时间】:2015-08-30 00:38:23
【问题描述】:

我有一个在 STS 中运行的 Maven Spring Boot 项目,该项目构建良好:

   <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>1.2.5.RELEASE</version>
        <relativePath /> <!-- lookup parent from repository -->
    </parent>

将上述 Spring Boot 的版本更新为 1.3.0.M4 会导致:

[FATAL] Non-resolvable parent POM: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:1.3.0.M4 from/to IWS_Repo (https://build-devtools.fw.net/artifactory/repo/): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target and 'parent.relativePath' points at no local POM @ line 18, column 10

我在 STS 和命令行中都试过了:同样的错误。

可能是什么问题?

【问题讨论】:

    标签: maven spring-boot


    【解决方案1】:

    与 Spring Boot 版本不同,Spring Boot 里程碑不会发布到 Maven Central。它们仅发布到 repo.spring.io。

    要从 1.2.5.RELEASE(可从 Maven Central 获得)升级到 1.3.0.M4(不可),您需要向您的 pom 添加一些额外的配置,以便 Maven 知道如何查看在 repo.spring.io 的里程碑存储库中:

    <repositories>
        <repository>
            <id>spring-milestones</id>
            <url>https://repo.spring.io/milestone</url>
        </repository>
    </repositories>
    <pluginRepositories>
        <pluginRepository>
            <id>spring-milestones</id>
            <url>https://repo.spring.io/milestone</url>
        </pluginRepository>
    </pluginRepositories>
    

    【讨论】:

    【解决方案2】:

    您的存储库似乎存在证书问题:

    sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path
    

    https://build-devtools.fw.net/artifactory/repo/

    尝试直接访问 Maven Central :> http://repo1.maven.org/maven/

    http://maven.apache.org/guides/introduction/introduction-to-repositories.html

    【讨论】:

    • 为什么更新父母时证书突然失效?
    • 分享你的整个 pom.xml 文件。
    猜你喜欢
    • 2019-05-19
    • 1970-01-01
    • 1970-01-01
    • 2021-01-20
    • 2020-04-02
    • 1970-01-01
    • 1970-01-01
    • 2016-05-24
    • 2019-10-12
    相关资源
    最近更新 更多