Maven项目生成错误:parent.relativePath指向没有本地POM的地方 [英] Maven Project Build Error : parent.relativePath points at no local POM

查看:296
本文介绍了Maven项目生成错误:parent.relativePath指向没有本地POM的地方的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在整个stackoverflow中进行搜索,发现了类似的帖子,但没有关于我的问题的特定内容,因此在此处发布了问题.

Searched throughout stackoverflow, found similar posts, but nothing specific to my issue, hence posting the question here.

这是错误描述:

Project build error: Non-resolvable parent POM for com.rahul.irs:rahulBoot_SpringCore:0.0.1-SNAPSHOT: Could not find 
artifact org.springframework.boot:spring-boot-starter-parent:pom:1.5.10.RELEASE and 'parent.relativePath' points at no local POM

这是我的pom.xml的快照,在其中我看到错误:

And here is the snapshot of my pom.xml where I see the error:

我已将中央存储库替换为:

I have replaced central repository to:

https://repo.spring.io/release/

代替:

http://repo.maven.apache.org/maven2/

由于我的网络阻止了默认的中央存储库.

Since my network is blocking default central repository.

Spring.io中央存储库正在我的网络中运行,但是出现上述错误.尝试删除本地存储库,并尝试了Maven->更新项目->

Spring.io central repository is working in my network, however I'm getting the above error. Tried deleting local repositories, and tried Maven -> Update Project ->

但是没有运气.有人可以告诉我这里出了什么问题吗?

But no luck. Can someone tell me whats going wrong here?

推荐答案

eclipse使用C:\ Users \ firstname.lastname.m2文件夹中的默认maven settings.xml文件.

Check Is setting.xml in  C:\Users\firstname.lastname\.m2 Folder exist or not. 

如果settings.xml文件不是它们,则只需插入settings.xml.

If settings.xml file is not their just insert settings.xml.

mvn clean install spring-boot:run

您可以在maven> conf文件夹中获取settings.xml文件,例如,我在d:驱动器D:\中提取了maven zip,驱动器使用apache-maven-3.5.4文件夹名称,因此我的settings.xml文件在D中:\ apache-maven-3.5.4 \ conf

You can get the settings.xml File inside the maven> conf folder e.g I extract maven zip in my d: drive D:\ Drive with apache-maven-3.5.4 folder name so my settings.xml file is in D:\apache-maven-3.5.4\conf

这篇关于Maven项目生成错误:parent.relativePath指向没有本地POM的地方的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆