父标签上无法解析的父 POM
Posted
技术标签:
【中文标题】父标签上无法解析的父 POM【英文标题】:unresolvable parent POM at parent tag 【发布时间】:2021-06-26 06:31:47 【问题描述】:在我正在处理的项目中,我有以下 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>
【问题讨论】:
【参考方案1】:请尝试以下方法:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.6.RELEASE</version>
<relativePath/>
</parent>
【讨论】:
以上是关于父标签上无法解析的父 POM的主要内容,如果未能解决你的问题,请参考以下文章
Maven:每个标签上出现不可解析的 POM 无法识别的标签错误
不可解析的父 POM,尽管 relativePath 设置为现有的父 pom.xml
使用 Maven 3.0.3 和 relativePath 表示法的不可解析的父 POM
报错: eclipse加载maven工程提示pom.xml无法解析org.apache.maven.plugins:maven-resources-plugin:2.3.2