10

I have a project in Eclipse and now I want to import another project with a different name and in different location, but with a same structure(same packages, a lot of same classes...), but when I try to import it, it says " Some projects cannot be imported because they already exist in the workspace". What should I do if I want to have both of two versions of one project? What should I change? Thx.

3 Answers 3

15

As the projects would have the same project names in the .project file, eclipse would not allow them to be imported into the workspace.

Open the .project file for the project root, confirm and change its name and then import it.

<projectDescription> <name>project1</name> </projectDescription> 
Sign up to request clarification or add additional context in comments.

3 Comments

Thank You, @Jayendra! Although, changing old project's name in Eclipse also helped!
@Jayendra, Isn't there a way to do this via the UI?
Sure, that works, but what if you have to import another branch in which there are 30 projects, which are interconnected? Won't work with the renaming I suppose because the original project names need to be preserved.
2

What you can do is create a new project with the name that you want it to be called. Once you do that right click on the new project and click import. You can then import your old project into this one which will have all the same files except a different name.

Comments

1

If the project has a different name that message is a bit strange. Anyway try editing the .project file in the root folder of the second project and change the value of the tag name

The .project file is hidden

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.