0

我在eclipse ide中导入了一个maven项目。当我在做

mvn 干净安装

收到以下错误

non-resolvable parent pom failure to find http://repo.maven.apache.org/maven2被缓存在本地存储库中,直到中央的更新间隔已经过去或强制更新并且'parent.relativePath'才会重新尝试解析' 指向没有本地 POM。

谁能帮我解决这个问题?

4

2 回答 2

0

Maven 找不到你的 pom 的父级。

你有两种方法来解决这个问题。

首先在您的父项目上运行 mvn clean install。或者确保<relativePath>...</relativePath>在子 pom.xml 中正确设置了父级。

如果您仍然有问题,请发布您的 pom,我们会看看。

于 2013-02-22T09:58:56.877 回答
0

Eclipse is not able to find the setting.xml file from the default path of user Setting so their is two solution

  1. Add the settings.xml file in the default location which is shown in the Run COnfiguration e.g : enter image description here

  2. Add the User setting path where your maven/conf/settings.xml is present.

NOTE : Add the D:/mavenRepo attribute with some location where you want your maven download and store the depedency mention in pom.xml. As you can see i create a folder with name mavenRepo in D:/ drive for this.

do the clean install and your project will start working hope so. enter image description here

于 2018-09-18T07:42:47.420 回答