At Cape Clear we use PDEBuild, controlled by CruiseControl driven Ant scripts to build our Eclipse features. As Oisín Hurley pointed out recently it has got a steep learning curve but once it is up and running it allows development teams to contribute to features by doing what is natural - using the Eclipse workbench tools to create and modify plugin projects.
Where PDEBuild wins big time is in eliminating redundant build metadata in your build system. The developers workbench is in sync with your build server because they both work off the same Eclipse project metadata. About the only pilot errors that trip up our builds occasionally are

  • missing entries in the plugin/bundle build.properties files cause PDEBuild to leave resources out of the packaged jar (or folder). Unfortunately these missing resources don’t always get noticed until runtime. e.g. missing icons showing up as red boxes because the icons didn’t get packaged.
  • missing entries in the PDEBuild map file cause PDEBuild to fail to resolve bundle dependencies. If it can’t find the source it can’t build the bundle!
  • missing entries in the feature.xml (for a newly contributed plugin/bundle). PDEBuild will only build the plugins listed in the feature!

That’s all well and good for us Eclipse plugin developers. But what about building other types of projects? Headless builds of Java projects (not plugin projects) can be achieved by using the AntRunner application entry point in conjunction with an Ant build script. Unfortunately the Ant script needs to be pre-generated (or hand-written) so one end up back in the situation where the Ant build script can easily get out of sync with the project metadata. For large project sets (>10) this type of duplicate build metadata is difficult and frustrating to maintain.

The issue becomes larger when one considers that many Eclipse based products implement additional natures and builders that they add onto the projects they create. For example, a builder might need to generate some java code or verify spring configuration files). Theses projects need to be built inside Eclipse (since the builders are workspace/workbench dependent) but currently there doesn’t seem to be any facility to do so in a headless manner. I’m thinking along the lines of an application entry point that can perform the following tasks:

  • Optionally import a set of projects into the target workspace
  • Optionally clean all projects
  • Build all projects in the order determined by the declared project dependencies (in the project descriptor), running all builders as it would if the Workbench UI running.
  • For each project optionally execute an action (supplied by a plugin in the workbench) that packages the build output into some external format (e.g. generating a WAR file from a WTP Dynamic Web project, generating JavaDoc from a Java project etc).

The last one above is a ‘nice-to-have’ since the invoking script may well be capable of finding the build output and packaging it using pre-defined rules.

Does anyone know of such a beast? Or is any effort underway to produce such a beast? Bugzilla doesn’t seem to have anything relevant which is a surprise.  This seems like an awfully useful feature for the Eclipse platform to support…