微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

父标记处无法解析的父 POM

如何解决父标记处无法解析的父 POM

在我正在处理的项目中,我有以下 pom.xml 文件。当右键单击并选择 maven clean 时,我收到以下错误

The project xx.xx.xx.xx.xx:0.0.1-SNAPSHOT (C:\Users\xx.xx\xx\xx-api\pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM for de.bund.jki.sf.awanti:api:0.0.1-SNAPSHOT: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.1.6.RELEASE from/to osgeo (https://repo.osgeo.org/repository/release/): Remote host terminated the handshake and 'parent.relativePath' points at wrong local POM @ line 10,column 10: SSL peer shut down incorrectly -> [Help 2]
[ERROR] 

我参考了我们网站上的一些问题,但没有解决问题。例如添加relativePath标签,它没有解决问题。 请找到下面发布的 pom.xml 文件。请让我知道如何修复它 Eclipse 生成错误位于

<parent>

它说:

Project build error: Non-resolvable parent POM for xx.xx.xx.xx.xx:api:0.0.1-SNAPSHOT: Failure to transfer org.springframework.boot:spring-boot-starter-parent:pom:2.1.6.RELEASE from https://repo.osgeo.org/repository/release/ was cached in the local repository,resolution will not be reattempted until the update interval of osgeo has elapsed or updates are forced. Original error: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.1.6.RELEASE from/to osgeo (https://repo.osgeo.org/repository/release/): Remote host terminated the handshake and 'parent.relativePath' points at wrong local POM

代码

<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>de.xx.xx.xx.xx</groupId>
<artifactId>api</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>

<parent>    
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.1.6.RELEASE</version>
</parent>


<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-data-mongodb</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-data-rest</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-security</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-test</artifactId>
        <scope>test</scope>
    </dependency>

解决方法

请尝试以下操作:

<parent>    
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.1.6.RELEASE</version>
    <relativePath/>
</parent>

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。