Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

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 (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

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 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 successfully create and run the Swordfish 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
  1. Switch to the directory [Swordfish project root directory]/rt/org.eclipse.swordfish.build
  2. 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]
  3. Start the ant script to run the build.
  4. 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 projects from the Swordfish SVN + version-to check-out, e.g. trunk.

To execute the local build:

  1. Switch to the directory <Swordfish project root directory>/rt/org.eclipse.swordfish.build and execute the ant build script with parameter:
    ant -Dlocal=true


You can also specify this property in your launcher.properties file.


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

Swordfish Documentation Home
Swordfish Wiki Home

Back to the top