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 -->
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.
Part of my day I’m working on some cool OSGi server stuff. While doing this I came across a few issues with PDE. Mostly they are around launching and self-hosting.
As with all my Open Source engagements, I just don’t stop after reporting them. I also take the time to analyze them and provide patches for them. Why? Well, it saves me a lot of time in the end because I don’t need to live with workarounds. 🙂
Here is a list of patches produced so far for Eclipse PDE 3.6:
- Bug 314619 – [patch] org.eclipse.equinox.app is not started when using Eclipse Application launcher
- Bug 315039 – [patch] Eclipse launch configuration should inherit properties from target platform
- Bug 315061 – [patch] Should read start levels from bundles.info of target platform when launching Eclipse application
- Bug 320763 – [patch] SelfHostingProfile needs environment properties
Now, thanks to Eclipse it’s also possible to easily share the patches with you. Just point your Eclipse 3.6 installation to my p2 repository (http://eclipseguru.org/) and install “EclipseGuru’s Patches for PDE“.