Tag Archives: Build

Use Target Definition Files in PDE Build

I’m not hip when it comes to building Eclipse based products. I still use plain vanilla PDE Build. The cool guys all switched to Tycho. Well, you’re allowed to call me dinosaur then. Anyway, I’ve been using .target files as a source for dependency management for quite a while now. They are very useful in Eclipse. All dependencies for all the bundles are defined in one place. You simply open one and Eclipse starts downloading one half of the Internet. Maven already did the other half, I’ve heard.

I also use them to drive PDE Build. Instead of specifying stuff to fetch for a build again I simply point PDE Build to the same .target file I use in the IDE. Works like a charm as long as you only use “Software Sites” (p2 repositories) which are accessible via URL by any developers Eclipse instance as well as the build machine.

Previously, this was implemented by transforming the .target file XML using XSL into an Ant script. The Ant script did a bunch of p2 mirror calls to download the bytes. I recently upgrade to a newer version of the builder containing a Juno version of the org.eclipse.pde.core bundle. Starting with 3.8 this bundle defines a nice Ant task that does not require the XSLT magic.

<target name="buildTargetPlatform" unless="skipTargetDefinition">
  <!-- note: this requires pde.core (from Juno) in the base builder -->

True Product Based Launches

I like Eclipse product configurations. Did I say that before? I use them a lot. They are a great way to assemble your final bits. PDE Build, Buckminster and soon Tycho are able to take them and put the stuff together. You’ll get a final zip that’s ready to hand out to consumers.

There is also a way to launch them. However, what always bothered me was that this was just a fake application launch. You had to use the product editor all the time to keep the launch configs in sync. But over time I noticed some issues. Sometimes, when updating target platforms, something gets out of sync, features will be missing, whatever. Your launch is broken and the guys start to line up next to my desk.

Hmm, wouldn’t it be nice to just launch products all the time and have them 100% like they should be all the time including automatic validation of missing features (even included once) and plug-ins?

Oh yes! If you need this, just install my Patches for PDE (via Help -> Install New Software…). I published a new version in my repository (http://eclipseguru.org/). The relevant patch is attached to bug 326059.