views:

149

answers:

4

For my current project, every time I set up a new workspace, I need to import hundreds of existing projects scattered in 20+ different directories. Is there a way to automate this step in Eclipse?

These projects are all checked into ClearCase.

A: 

Could you import them all into a SCCS and then check them out all at once? You might try this as an experiment using cvs, not because you want to start using cvs in 2009, but because it has the best Eclipse support. If cvs can't do it, the others probably can't either.

DigitalRoss
Forgot to mention, I am using ClearCase for version control. Most of these project I will never need to check out. I just need them imported into my workspace so I can build.
Kevin Beck
+1  A: 

This answer shows how to import an arbitrary set of projects into Eclipse using a custom plugin.

If I understand your question correctly, you would simply need to specify the paths of all the projects to import in the newprojects.txt file in the workspace root. You may want to remove the part that deletes existing projects though.

Rich Seller
A: 

For snapshot views, we have a "template" workspace which reference the .project and .classpath files in a "standard" way:

 c:\ccviews\projectA\vob1\path\...
 c:\ccviews\projectB\vob1\path\...
 c:\ccviews\projectC\vob2\path\...

So by copying that workspace, we are able to quickly setup the projects for a new member of the team.
Each colleague will define their own snapshot views with:

  • a unique name (
    • colleague1_projectA_snap,
    • colleague1_projectB_snap,
    • ...)
  • the same root directory for each view referring to a given project
    (c:\ccviews\projectA for:
    • colleague1_projectA_snap or
    • colleague2_projectA_snap or
    • colleague3_projectA_snap...)

Since a snapshot view can be located anywhere you like on your disk, you can:

  • define a standard path
  • scale that to a large number of snapshot views.

Of course, that would not be possible with dynamic views, since their paths would by:

m:\aUniqueName\vob1\path

You could ask for each user to associate a view to a drive letter, but that do not scale for a large number of views.
Anyway, dynamic views are great for accessing and consulting data, not for compilation (the time needed to access any large jar or dll through the network is just too important)

VonC
A: 

Eclipse as the concept of project sets, but I'm pretty sure that's tied to using CVS. My team used this feature and it's how we shared the set of projects between us.

Another 2 alternatives I know of:

Buckminster

It's an Eclipse project which does component assembly, and one part of that is projects. Documentation was a bit crappy last time I played with it, but it does work. No idea if they have support for ClearCase, though it is extensible.

Jazz

Costs money and is also built on Eclipse. Covers similar ground to Buckminster but goes a whole lot further in team-orientated stuff.

hbunny