Jump to: navigation, search

Swordfish Documentation: Creating Headless Build

Creating and Running a Headless Build

This section contains instructions on creating a headless build.

Swordfish build process1.png

Prerequisites

The following prerequisites must be met before you start creating the build. You must have the latest version of Eclipse, Apache Ant & Subversion installed. Detailed instructions are provided here.

Eclipse

Install a fresh Eclipse SDK you want to use for building and keep it free from modifications.

Eclipse Test Framework

Download Eclipse Testing Framework package. You will need it in order to run integration tests which are part of the headless build.
Eclipse Testing Framework for Eclipse for Galileo or Helios (Note that you cannot use a later Helios milestone than M3 for JUnit compatibility reasons!)

Ant

Install the latest Ant build with the optional tasks (currently, the version available is 1.7) and include it into your path.
You can find the latest version here: Apache Ant

Subversion PDE build plugin

This plugin is required to translate the CVS fetch commands PDE build creates to SVN commands.

You can download the zipped version here: SVN PDE Build

SVN

Install the latest version of the SVN client (currently, the version available is 1.6.2).
You can find the latest version here: Subversion

Check Proxy Settings

If you want to run the build scripts within a firewall, ensure that you enable the proxy settings. E.g. add the -autoproxy parameter when you run the ant scripts.
NOTE: The ant scripts use your default system proxy settings.

You also need to ensure that your SVN client is enabled to access the Swordfish Repository via your proxy.

Runtime build

The build process is divided into two main stages. The first stage involves the following steps:

  1. Generate the third-party bundles
  2. Create an update site and store these bundles there.
  3. Upload the update site into the Swordfish download area.

NOTE: The last step only needs to be done when changes occur. E.g. when you create a new bundle, remove an obsolete bundle or create a new bundle version.

The second stage involves the following steps:

  1. Create the Swordfish site.
  2. Create the corresponding Swordfish update site.

You also need to ensure that your SVN client is enabled to access the Swordfish Repository via your proxy.

Running a Third-Party Build

This is the first step of the Swordfish build process, that is, creating the third-party builds.

To successfully create and run the third-party build:

  1. Check out the following projects from the Swordfish SVN + version-to check-out, e.g. trunk.
    • rt/org.eclipse.swordfish.build
    • rt/org.eclipse.swordfish.bundles
    • third-parties/org.eclipse.swordfish.third-parties.site
  2. Edit the [local_directory]/rt/org.eclipse.swordfish.build/etc/launcher.properties to set these two properties:
    • eclipseLocation=[root directory of Eclipse installation, e.g. c:/BuildTools/eclipse]
    • pdeSvnBuildPluginPackage=[fully qualified path to Subversion PDE build plugin zip e.g. c:/BuildTools/org.eclipse.pde.build.svn-1.0.1RC2.zip ]
  3. Switch to the directory <Swordfish project root directory>/rt/org.eclipse.swordfish.build
  4. Start the ant script to run the build with the parameter, third.parties.
  5. Check the build results in <local_directory>/rt/org.eclipse.swordfish.build/target-third-parties.

NOTE: The build results consist of the update site for Swordfish third-parties. It is located in the site sub-directory.

Running the Swordfish RT Headless Build

This is the second step of the Swordfish build process, that is, creating the Swordfish build and update site.

Running as remote build

To run the Swordfish RT build:

  1. Check out the following projects from the Swordfish SVN
    • rt/org.eclipse.swordfish.build
    • rt/org.eclipse.swordfish.bundles
    • third-parties/org.eclipse.swordfish.third-parties.site
  2. Switch to the directory [Swordfish project root directory]/rt/org.eclipse.swordfish.build
  3. Edit the [used_directory]/org.eclipse.swordfish.build/etc/launcher.properties to set these three properties:
    • eclipseLocation=[root directory of Eclipse installation, e.g. c:/BuildTools/eclipse]
    • pdeSvnBuildPluginPackage=[fully qualified path to Subversion PDE build plugin zip e.g. c:/BuildTools/org.eclipse.pde.build.svn-1.0.1RC2.zip ]
    • eclipseTestFrameworkPackage=[location of Eclipse Testing Framework archive, e.g. c:/BuildTools/eclipse-test-framework-3.5.zip]
  4. Start the ant script to run the build.
  5. Check the build results:
  • Browse to the directory org.eclipse.swordfish.build/target.
  • The site sub-directory contains the update site for Swordfish.

Running as local build

Before you run a local build the following tasks must first be completed.

  1. Execute the third-party build (This has to be a remote build!).
  2. Check the build results.
  3. If not already done, check out all rt and third-parties projects from the Swordfish SVN + version-to check-out, e.g. trunk.

To execute the local build:

  • Switch to the directory <Swordfish project root directory>/rt/org.eclipse.swordfish.build and execute the ant build script with parameter (You can also specify this property in your launcher.properties file.):
    ant -Dlocal=true

Executing runtime tests

By default the tests execution is enabled. The results of the tests will be stored in

  • rt/org.eclipse.swordfish.built/target/unit-tests
  • rt/org.eclipse.swordfish.built/target/integration-tests

You can switch off the test execution by setting the system property noTest to true. E.g.:

ant -DnoTest=true

To run the tests later without doing a full build, use the targets

  • unit.tests to run the unit tests and
  • integration.tests to run the integration tests

Tooling build

To run the tooling build, you need the build results of the Runtime build.

Prerequisites

In addition to the general prerequisites building tooling requires some more tools. For license reasons and to make them easy to fetch they are provided in the BuildTools directory at GoogleCode SVN.

Check out this directory to your local file system.

Running as remote build

To run the Swordfish Tooling build:

  1. Check out the project tools/org.eclipse.swordfish.build from the Swordfish SVN
  2. Switch to the directory [Swordfish project root directory]/tools/org.eclipse.swordfish.tooling.build
  3. Edit the [used_directory]/tools/org.eclipse.swordfish.tooling.build/etc/launcher.properties to set these properties:
    • eclipseLocation=[root directory of Eclipse installation, e.g. c:/BuildTools/eclipse]
    • pdeSvnBuildPluginPackage=[fully qualified path to Subversion PDE build plugin zip e.g. c:/BuildTools/org.eclipse.pde.build.svn-1.0.1RC2.zip ]
    • eclipseTestFrameworkPackage=[location of Eclipse Testing Framework archive, e.g. c:/BuildTools/eclipse-test-framework-3.5.zip]
    • third-parties=[path to the build tools directory, e.g. c:/BuildTools]
    • lastGoodRTBundleLocation=[path to the runtime bundles in [Swordfish project root directory]/rt/org.eclipse.swordfish.build/target/platform/plugins]
  4. Start the ant script to run the build.
  5. Check the build results:
  • Browse to the directory org.eclipse.swordfish.tooling.build/target.
  • The site sub-directory contains the update site for Swordfish tooling.

Running as local build

  1. Modify the [used_directory]/tools/org.eclipse.swordfish.tooling.build/etc/launcher.properties as described for the remote tooling build.
  2. If not already done, check out all tools projects from the Swordfish SVN + version-to check-out, e.g. trunk.

To execute the local build:

  • Switch to the directory <Swordfish project root directory>/tools/org.eclipse.swordfish.tooling.build and execute the ant build script with parameter (You can also specify this property in your launcher.properties file.)
ant -Dlocal=true

Executing tooling tests

The unit tests are exclusively executed during the tooling build (remote or local). There is no option to run them separately.

If the build of tooling has finished successfully you can execute the system tests. Note that the tooling system tests run using SWTBot, so you have to wait until they have finished - otherwise they might fail.
The results will be stored at <Swordfish project root directory>/tools/org.eclipse.swordfish.tooling.build/target.

Running system tests as remote build

  1. Check out the project tools/org.eclipse.swordfish.tooling.systemtest.build from the Swordfish SVN
  2. Switch to the directory [Swordfish project root directory]/tools/org.eclipse.swordfish.tooling.systemtest.build
  3. Start the ant script to run the build.

Running system tests as local build

  1. Checkout & modify the [used_directory]/tools/org.eclipse.swordfish.tooling.systemtest.build/etc/launcher.properties as described for the remote system test build.

To execute the local build:

  • Switch to the directory <Swordfish project root directory>/tools/org.eclipse.swordfish.tooling.systemtest.build and execute the ant build script with parameter (You can also specify this property in your launcher.properties file.)
ant -Dlocal=true



Swordfish Documentation Home
Swordfish Wiki Home