java - 项目构建错误: Non-resolvable parent POM for org. springframework.boot:spring-boot-starter-parent:[未知版本]:传输失败

标签 java spring azure spring-boot

我尝试使用azure在springboot中创建一个项目,并在生成我的pom.xml后。我收到一个错误:

Project build error: Non-resolvable parent POM for org.springframework.boot:spring-boot-starter-parent:[unknown-version]: Failure to transfer org.springframework.boot:spring-boot-dependencies:pom:2.1.0.RELEASE from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.springframework.boot:spring-boot-dependencies:pom:2.1.0.RELEASE from/to central (https://repo.maven.apache.org/maven2): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

这是我的pom.xml

 <?xml version="1.0" encoding="UTF-8"?>
    <project xmlns="http://maven.apache.org/POM/4.0.0" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
    http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>ph.com.meralco.imcs</groupId>
    <artifactId>IMCS_Azure_Test</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>war</packaging>

    <name>IMCS_Azure_Test</name>
    <description>Demo Web App for IMCS Azure Integration</description>

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

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF- 
    8</project.reporting.outputEncoding>
        <azure.version>2.0.5</azure.version>
        <java.version>1.8</java.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-security</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>com.microsoft.azure</groupId>
            <artifactId>azure-active-directory-spring-boot-starter</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-tomcat</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-test</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-oauth2-client</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-oauth2-jose</artifactId>
        </dependency>
    </dependencies>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.microsoft.azure</groupId>
                <artifactId>azure-spring-boot-bom</artifactId>
                <version>${azure.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>

    </dependencyManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build> 
    </project>

最佳答案

从日志来看,这似乎是一个网络问题,因为您的本地 Intranet 不允许您的 IDE 从公共(public) Maven 存储库下载依赖项。尝试更改您的网络并开始下载依赖项。

关于java - 项目构建错误: Non-resolvable parent POM for org. springframework.boot:spring-boot-starter-parent:[未知版本]:传输失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53477349/

相关文章:

java - 如何调整屏幕以使光标指向突出显示的文本

java - 在运行时重新初始化 spring 中的 bean

php - 按计划部署 Azure 云服务

asp.net - 性能缓慢 Azure 'Web App' + Azure SQL DB

powershell - 使用 powershell 进行 Azure 发布

java - 无法在线从wamp服务器访问mysql数据库

java - 将 JPanel 大小设置为不大于其包含的元素

java - 在 OpenNLP 中训练命名实体

spring - 如何将 bean 列表 Autowiring 为不可修改?

java - Spring MVC - 当整数值为零时如何显示空白文本框