找到你要的答案

Q:Maven root pom.xml marked as red when importing existing project into eclipse

Q:Maven pom.xml文件标记为红色的根当导入到Eclipse现有项目

When importing existing maven project into eclipse my root pom.xml is marked red. when i select on the pom.xml the message reads :

Can't import project XYZ from an existing workspace folder

This only happens for the root pom.xml

Eclipse in use: Luna Service Release 2 (4.4.2) Maven Integration for Eclipse 1.5.2.20150413-2215

I have tested with number of different maven projects and in different workspaces.

Please note this worked before, I have been working on some tutorials and created number of Maven projects with same name and artifact Ids etc. I have deleted all the earlier projects, but could there still be some conflicts ?

any suggestions will help

When importing existing maven project into eclipse my root pom.xml is marked red. when i select on the pom.xml the message reads :

不能导入项目XYZ从现有工作区文件夹

这只是发生在根的pom.xml文件

Eclipse in use: Luna Service Release 2 (4.4.2) Maven Integration for Eclipse 1.5.2.20150413-2215

我有不同的Maven项目数和不同工作区测试。

请注意这个工作之前,我一直在一些教程和创建具有相同的名称和神器IDS等我Maven项目数已经删除所有早期的项目,但可能还会有一些冲突?

任何建议将有助于

answer1: 回答1:

Yes, You should start your Eclipse Workspace out of the pom.xml folder.

for example: D:\workspace\Project_Name.

In your Project_Name folder which contains pom.xml.

So you have to select D:\workspace while starting the eclipse.

And now, then import the project called Project_Name as maven project, It will work.

Hope, it will help !!

是的,你应该开始你的Eclipse工作区的pom.xml文件文件夹。

例如:D:\工作\ project_name。

在你的project_name文件夹中包含的pom.xml文件。

因此,在开始Eclipse时,您必须选择。

现在,然后导入项目称为project_name Maven项目,它将工作。

希望,会有所帮助!!

answer2: 回答2:

I also came across this same issue. I kept my eclipse workspace name and existing maven project name same and got the error importing pom.xml. Later i opened new workspace with different name which is not matching to the existing maven project and now i could import maven project.

我也遇到过同样的问题。我保持我的Eclipse工作区名称和项目名称相同的现有Maven了错误导入xml。后来我用不同的名称不匹配现有的Maven项目,现在我可以导入Maven项目开辟了新的空间。

java  eclipse  maven  import  parent-pom