I am trying to import a project that me and my co-worker have been working on.. and keep getting this error after I select-- \"import\" then \"import existing project\" then
In my case, I copied one of the projects (say 'Project1') from the workspace and pasted it to the same workspace. After that I modified the name of the pasted project (say to 'Project2'). I could not see it in the repository.
The main reason was .project
file from the new project still had:
<name>Project1</name>
instead of <name>Project2</name>
.
So, I did following things in order to get the issue fixed:
.project
file to have <name>Project2</name>
It worked for me.
You have one occult directory named ".metadata" in workspace directory. Close Eclipse, delete ".metadata" and open Eclipse. When eclipse ask you about workspace make sure that ".metadata" isn't in workspace directory and click "ok" button to select default workspace.
Uncheck the "copy projects into workspace" checkbox, and then click "refresh" button, you will be able to import the project
It was happened to me when
I delete project from eclipse Project Explorer and not checked the remove content from disk.
Next time when I tried to import same project in workspace then got same problem.
To solve I just did FYI work that every kid can do :)
So How I solved it:
Ctrl + x
myProject folder from eclipse workspace to other location ie DesktopNavigator
(you can get it from Window > Show View > Navigator
) and Refresh (it will prompt following dialog)
Yes
button and move your project folder back to eclipse workspace directoryThis warning means you just deleted project from navigator, but the project is present in the working set. Or else your working set has project with same name, so go to work-space directory and delete the project which has the same name and import again.
My problem was a little bit different.
For example, the project name (what I see) was FooProject and in the imported project, I was looking for the FooProject but I could not. However, Eclipse does not let me import that project because he claims that it is already imported. And then, I have looked at the .project
file of the project and I have seen that the actual name of the project was not what I see (FooProject).
The conclusion;
The name of the project (what you see in Eclipse) may be different than the actual name of the project (what maven see). Because of this reason. Please be sure that they are the same name by checking .project
file of the project.