Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » P2 » Perform site.xml "Build All" programmatically
Perform site.xml "Build All" programmatically [message #876442] Thu, 24 May 2012 15:50
Mohammed Ajmal is currently offline Mohammed AjmalFriend
Messages: 6
Registered: July 2009
Junior Member
Hi everyone,

I want to be able to perform the "Build All" action programmatically. Specifically, what I want to accomplish is start with a site.xml that a user has added some features to and generate the features/plugins directories and the p2 metadata (content.jar, artifacts.jar) programmatically.

I've already looked at the UpdateSite publisher ( This works great to produce the p2 metadata but requires the features/plugins as input (along with the site.xml).

Browsing the code, I actually know exactly how to accomplish what I want (see snippet below), but this references internal classes and of course, I'd like to avoid that. Any thoughts? I'm looking for some public API that accomplishes this same behaviour.

   WorkspaceSiteModel wsm = new WorkspaceSiteModel(project.getFile("site.xml"));
   SiteBuildOperation sbo = new SiteBuildOperation(getFeatureModels(wsm.getSite().getFeatures()), wsm, "Test job");

Where getFeatureModels() is taken from

It would actually be ideal if these classes were themselves public! There's quite a lot being done in those couple of simple lines of code... Thanks for your help.
Previous Topic:Local mirror of eclipse repository
Next Topic:Is building own distribution by p2 is correct way?
Goto Forum:

Current Time: Thu May 24 23:48:44 GMT 2018

Powered by FUDForum. Page generated in 0.07578 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top