Building RDT as example

The PDE automation article uses RDT (Ruby Development Tools) as an example. In analogy this manual  describes how to leverage Plug-in Builder to set up and build RDT. As a prerequisite every plug-in you want to build needs a feature. The next screenshot shows the Feature Manifest Editor for rdt.

Many versions of many plug-ins are set to 0.0.0 which will be replaced after check-out with the version which is defined in the Release Configuration.

Set up the version control client

Although you have checked out your workspace from your Version Control system and created a repository in your preferred Version Control plugin (CVS, Subversive,...) this is not sufficient for PDE build. PDE build does not make use of the Version Control plug-in but uses a command line Version Control client. Therefore either the cvs or svn command must be available on command line. Before proceeding to the next step make sure that the command line client is set-up correctly and can access the repository without manual interaction.

For RDT I tried:

C:\> svn --username mbarchfe log https://svn.sourceforge.net/svnroot/rubyeclipse/trunk

 

Create pluginbuilder project

Go to

File > New > Project...

and select Plugin Builder Project (Category is now Other but should be Plug-in Development).

Enter a name, in the example buildrdt. Then the wizard will create a new project with the following structure:

  • build-files: a directory which contains skeletons for the build, e.g. customTargets.xml and build.properties, but also files for subversion support
  • build_local.properties: information about your local environment, e.g. temp directory, directory of the Eclipse host and of the pluginbuilder project
  • pluginbuilder.config: the main configuration file which controls the build and whose contents can be configured with the Pluginbuilder Editor

Plug-in Builder Editor

Open the pluginbuilder Editor by double-clicking pluginbuilder.config.

The first step is to choose the feature to build. Use the Add Button to select a feature from your workspace.

Then Version Control must be configured. For RDT only the SVN URL must be provided since sourceforge allows anonymous access.

The information which you edit with the Plug-in Builder Editor is used twofold: firstly it is stored in  the  file pluginbuilder.config which is included as property file during the build and secondly further build files are generated using this input.

Now "Generate build files". This creates the files for fetching the sources and the allElements.xml which is included from customTargets.xml.

Before building the Release Configuration should be checked. Per default there is one Release Configuration for building HEAD. For RDT only the version must be changed from 0.1.0 to 0.9.0, for further information see Release HOWTO.

Now build locally with "Run Head". The "Open Build Directory" opens the browser on the directory where the build takes places.

Build on the server

When the build runs fine locally it is time to upload the configuration to the server and have it executed nightly. Choose the Server Configuration tab from the Plug-in Builder Editor and enter the account information for the pluginbuilder.org build server. Then the build can be triggered manually. The results and log file can be checked with "View build results".

Select build targets

The Plug-in builder project contains a main build file build.xml which provides targets to run particular PDE build targets instead of the full build. E.g. to run only the process target you can right click build.xml, select "Run As>Ant build..." and choose the process target. Alternatively go to to Outline View of build.xml and start the build with "Run As>Ant Build" from the context menu of the process target.