0

I'm using Eclipse Kepler, and I'd like to create a second Maven workspace based off of an existing Maven workspace, without having to go through the rigamarole of setting up and checking out everything from scratch. Unfortunately, I can't figure out how to do it.

Simply copying the workspace folder to a new name is no good. The parent Maven projects all point to the new folder, but the sub-projects within the parent projects point back to the old workspace.

I tried exporting the workspace settings, creating a new workspace, importing the settings, and then importing the new projects. Importing them as "Existing Maven Projects" didn't copy the files into the new workspace, which is the behavior I want. Importing them as "Existing Projects into Workspace" resulted in the problems described here.

What's the right way to do this? Am I stuck with just re-checking everything out of source control?

Community
  • 1
  • 1
BlairHippo
  • 9,502
  • 10
  • 54
  • 78
  • 2 workspaces looks odd. If you really need this (why?) - you can probably store the project outside of workspaces, run mvn eclipse:eclipse, then import existing maven project into both workspaces. – Sergey Makarov Nov 07 '13 at 17:28
  • I'm sometimes required to start a new project before an old one is completed. When that happens, I prefer to create a new workspace so that I don't get confused about what changes belong to what project. When I'm ready to go back to the old project, I simply hop back to the old workspace, integrate any new stuff from source control, and I'm good to go. – BlairHippo Nov 07 '13 at 17:33
  • If you need to have 2 projects (2 versions of same project?) you can actually have them in 1 workspace. Just put them to different working sets (so that it is easy to sort them) and configure build and other settings on per project basis. – Sergey Makarov Nov 08 '13 at 06:03
  • In Eclipse terms, each workspace contains several "projects". (About a half-dozen Maven parent projects, each with a bunch of children.) I'm really, really wary of the different working sets getting in each other's way, though you may be right about that being the best solution. – BlairHippo Nov 08 '13 at 17:45
  • What about working set per parent pom? This way you get working sets corresponding to components of your solution (and you can also manage versions of these components in the same way). – Sergey Makarov Nov 10 '13 at 17:29

0 Answers0