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
Advertisement
Answer
Yes, You should start your Eclipse Workspace out of the pom.xml folder.
for example: D:workspaceProject_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 !!