Wednesday, February 23, 2011

PDE build as workspace export

A question came up on the newgroups^H^H^H^Hforums recently about a headless way to build/export features and plugins from a workspace. It turns out it is possible, using the pluginPath property.

When you configure the PDE build build.properties:
  1. Your provided topLevelElementId has to be your feature, or a "master" feature.
  2. You must provide an elementPath property that's the absolute path to your master feature.
  3. Your pluginPath can then point to your workspace.
  4. You probably want to skipBase, skipMaps, and skipFetch
  5. p2.gathering = true will generate the p2 metadata
  6. p2.category.site=file://site.project/site.xml will include the site categories in the generated build repo
You also have to override "gatherLogs" in your customTargets.xml.  Your build repo is ready to install!

But I wouldn't recommend it.  Without digging into some arcane PDE build properties, it pollutes your workspace with build files, @dot directories, etc.