当前位置: 首页 > 知识库问答 >
问题:

项目生成错误:org.springframework.boot:spring-boot-starter-parent:[unknow-version]:传输失败

席烨
2023-03-14

我尝试用azure在springboot中创建一个项目,然后生成POM。我有一个错误:

项目生成错误:org.springframework的父POM不可解析。boot:spring-boot-starter-parent:[unknow-version]:无法传输org.springframework。boot:spring-boot-dependencies:POM:2.1.0。来自https://repo.maven.apache.org/maven2的版本已缓存在本地存储库中,在经过central的更新间隔或强制更新之前,不会重新尝试解析。原始错误:无法传输项目org.springframework.boot:spring-boot-dependencies:pom:2.1.0.从/到central发布(https://repo.maven.apache.org/maven2):sun.security.validator.validatorexception:PKIX路径构建失败:sun.security.provider.certpath.suncertpathbuilderexception:找不到请求目标的有效证书路径

这是我的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>

共有1个答案

史承福
2023-03-14

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

 类似资料: