STP/Build 101

From Eclipsepedia

Jump to: navigation, search

Contents

Introduction

This page is meant to serve as a general overview to how the STP build system works, what each of the directories you see are for, and how to go about making the most commonly required updates.

Getting started

Firstly, you'll need to checkout the build system. Typically, you should just able to check out the latest version of the build:

cvs -d :pserver:anonymous@dev.eclipse.org co build

The only thing that you can change which will influence the build at this point is the stuff in the cruise directory. The releng / releng.stpbuilder give you an indication of what will happen on the build, but changing them at this point will not result in any changes to the build that will be executed. Why? Well the first thing that happens when you run the build from the cruise directory is that it will proceed to checkout a specific version of releng / releng.stpbuilder from CVS, and then begin the build from that directory. So if you're changing any files in those directories, commit first, then build.

OK, so what do these directories actually do, and why would you need to change them. Lets now start to look at this in a little more detail. After checkout of build, you get a relatively simple looking directory structure as follows:

 build
        cruise
        releng
        releng.stpbuilder

So, what are these directories for then? Let's start with the cruise directory....

The cruise directory

The cruise directory is where you'll go to do a build. It's default action is build / test everything, created deployment packages, update sites, etc, and rsync everything over to the main eclipse development machines so it's available for download. Don't just build after checkout though, it will most likely fail.

Start by looking at the build.properties file. You'll need to change the following in it:

build.home= the location that you've checkout the build directory into

mapVersionTag= The version of the build system that you'd like to checkout. Current 3.3 builds are tagged with STP_33_M? where ? represents the build number.
mapCvsRoot=where cvsroot is, e.g. :pserver:anonymous@dev.eclipse.org/cvsroot/stp
buildType=I (I for integration, S for stream stable)

And change the following to suit the platform that you're building STP on:

baseos=linux
basews=gtk
basearch=x86

So, before running ant, you'll need to set up some classpath stuff. export J2SE15=${JAVA_5_HOME}/jre/lib/rt.jar

Yip, you need Java 1.5 to build STP.

The releng directory

The releng directory contains descriptions for all the main components that are part of the STP. When you add new features, plugins, etc, you'll be working with the contents of this directory. In releng you'll see a maps directory. In here you'll see map files for:

* All the features that are required to be built (e.g.  stp-bpmn.map )
* All the plugins corresponding to these features  (e.g. stp-bpmn-plugins.map)
* A dependency.properties file that is used to describe what are required to build the various plugins.

The releng.stpbuilder contains all the build infrastructure pieces to build the stp.