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

Teneo/Teneo Build Setup

This page describes the Teneo build setup. Teneo uses Buckminster and Hudson for its continuous build infrastructure.

The Teneo Hudson job is available [here].

Try it

With the current build setup it is quite easy to do a Teneo build. To download Teneo and do a build (building, testing, generating p2 site) you need to do the following steps:

cvs -d dev.eclipse.org:/cvsroot/modeling co -d org.eclipse.emf.teneo.releng.buckminster \
org.eclipse.emf/org.eclipse.emf.teneo/releng/org.eclipse.emf.teneo.releng.buckminster
cd org.eclipse.emf.teneo.releng.buckminster
ant

Note the above assumes that ant is installed and that JAVA_HOME is set to Java 5.0 or higher.

After about 20 minutes you will see a build folder with a number of subfolders:

  • build: contains the targetplatform (the tp subfolder) for building the main plugins and the build workspace itself (the workspace subfolder)
  • test: contains the targetplatform for testing (in the tp subfolder), the workspace subfolder contains the workspace used for the test projects.
  • output: contains temporary output from the build steps.
  • result: contains the generation result (p2 site) and the test results.
  • tools: contains buckminster and the p2 director applications. These are downloaded as part of the build.

The build workspace (build/workspace) and test workspace (test/workspace) can be opened in Eclipse as workspaces.

Main builds steps (build, generate, test)

The build process is driven by an ant script which goes through the following steps:

  1. download the p2 director and using the director download buckminster.
  2. build the main deliverables (using buckminster):
    1. download the development projects from CVS and use them to create a workspace with a target platform
    2. download/retrieve the dependencies and set them in the targetplatform
    3. build the software (compile etc.)
    4. build the update site
    5. create downloadable zips
  3. build the test projects (using buckminster:
    1. download the development test projects from CVS and use them to create a workspace with a target platform
    2. download/retrieve the dependencies and set them in the targetplatform. This includes the artifacts generated in the previous step.
    3. build/compile the test plugins
  4. run the test cases and convert the test results to a format which can be read by hudson

The build itself is done by an ant script which calls buckminster to perform the above steps. The ant script also take care of copying the output (p2 site and features/plugins) and creating zip files etc.

Structure of build projects/features

To setup the build a number of (feature) projects have been setup:

  • org.eclipse.emf.teneo.releng.buckminster: contains the ant files, and the buckminster files for the build and test step. The content of this project and the buckminster setup is described in more detail below.
  • org.eclipse.emf.teneo.site-feature: defines the update site and the main features it contains (Teneo Hibernate runtime and SDK and Teneo EclipseLink runtime and SDK). This project contains a buckminster.spex file to define extra dependencies (this is described in more detail below). The included features:
    • org.eclipse.emf.teneo.hibernate-feature: the runtime feature, this is a standard PDE feature project (the plugins are defined in the feature.xml).
    • org.eclipse.emf.teneo.hibernate.sdk-feature: the SDK feature includes the runtime feature and source feature (see below for more information on building SDK features).
    • org.eclipse.emf.teneo.eclipselink-feature: the EclipseLink runtime feature, this is a standard PDE feature project (the plugins are defined in the feature.xml).
    • org.eclipse.emf.teneo.eclipselink.sdk-feature: the SDK feature includes the runtime feature and source feature (see below for more information on building SDK features).
  • org.eclipse.emf.teneo.tests-feature: contains the test plugins and their dependencies. The main test plugins contain test launch configurations (see below running test cases).

Buckminster Setup

The Teneo build uses Buckminster Headless.

Download buckminster

director -r http://download.eclipse.org/tools/buckminster/headless-3.6/ -d buckminster3.6M5 -i org.eclipse.buckminster.cmdline.product -i org.eclipse.buckminster.core.headless.feature.feature.group -i org.eclipse.buckminster.pde.headless.feature.feature.group -i org.eclipse.buckminster.cvs.headless.feature.feature.group

Main build project: org.eclipse.emf.teneo.releng.buckminster

buckminster.spex in PDE Feature projects

Testing

  • Launch setup
  • xslt script execution to process test results

Code Coverage

  • change junit to emma in buckminster call
  • specify xml parameter
  • set hudson configuration, note value is the xml file not a pattern
  • code coverage works on all the projects in the workspace, so for the current setup of Teneo it makes less sense because Teneo separates the build and test steps in separate workspaces

Solving some warnings

  • [java] WARN: CVS file org.eclipse.emf/org.eclipse.emf.cdo/hibernate/org.eclipse.emf.cdo.tests.hibernate/src/org/eclipse/emf/cdo/tests/hibernate/external_model1_4.persistence.xml either contains invalid line endings on the server (CR/LF instead of just LF) or is a binary file that is not marked as -kb.
  • [java] Warning: file /opt/users/hudsonbuild/.hudson/jobs/emf-teneo-nightly/workspace/build/build/workspace/plugins/org.eclipse.emf.teneo.annotations/META-INF/MANIFEST.MF,line 9: The JRE container on the classpath is not a perfect match to the 'J2SE-1.5' execution environment

[append code snippet from build file]

Links

For the Teneo setup some scripts have been re-used from the Buckminster build itself. The Buckminster releng/build project can be found here in svn.

I good tutorial on using Buckminster and Hudson to build RCP can be found here.

Back to the top