Programmatically generate an Eclipse project

You should be able to accomplish this by writing a small Eclipse plugin. You could even extend it out to being a "headless" RCP app, and pass in the command line arguments you need.

The barebones code to create a project is:

IProgressMonitor progressMonitor = new NullProgressMonitor();
IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
IProject project = root.getProject("DesiredProjectName");
project.create(progressMonitor);
project.open(progressMonitor);

Just take a look at the eclipse code for the Import Project wizard to give you a better idea of where to go with it.


Use AntEclipse

It can create eclipse projects from ant.

Tags:

Java

Eclipse