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 (wiki.eclipse.org/Equinox/p2/Publisher#UpdateSite_Publisher_Application). 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"));
   wsm.load();
   SiteBuildOperation sbo = new SiteBuildOperation(getFeatureModels(wsm.getSite().getFeatures()), wsm, "Test job");
   sbo.schedule();


Where getFeatureModels() is taken from org.eclipse.pde.internal.ui.editor.site.SiteEditor.

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: Fri Dec 06 04:54:06 GMT 2024

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

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

Back to the top