**template**
README
Last Updated: Dec 5, 2003
This document describes how to build <project>components from the command line using Ant scripts in this project and org.eclipse.releng.basebuilder.
Table of Contents
Description
Prerequisites
Setup
Run the Build
Ant
properties defined build.properties
<project>
Configurations
Examples
org.eclipse.<project>.releng.builder
contains Ant scripts that invoke script generators in org.eclipse.pde.build to
build all shipped components of <project>: SDK,
runtime, tests, and examples.
1. CVS version 1.10 or higher (For
CVS 1.11.9
WIN32).
2. 1.4 level
JDK.
3. A 1.3 level
Windows JRE to compile against.
4. Info-Zip
zip and unzip
6. org.eclipse.releng.basebuilder and org.eclipse.<project>.releng.builder
from dev.eclipse.org.
Setup
1. Add the CVS and Info-Zip executables to your path as required.
2. Add the 1.4 jre/bin directory of the installed JDK to your path.
3.
Check out org.eclipse.releng.basebuilder and org.eclipse.<project>.releng.builder
into a directory.
Run the Build
cd to org.eclipse.<project>.releng.builder directory and execute the following command (currently the build.xml script can only be executed in a headless eclipse due to bug 35923):
"java -cp ../org.eclipse.releng.basebuilder/startup.jar org.eclipse.core.launcher.Main
-application org.eclipse.ant.core.antRunner -buildfile build.xml -Dbuilder=sdk
| runtime| examples | tests [Ant properties to override in a component's
build.properties] "
The
component property value sets the name of the directory in org.eclipse.<project>.releng.builder
which contains the Ant scripts that build a given an <project> component
as descibed below:
Component (directory name in org.eclipse.<project>.releng.builder) | Description |
sdk | This directory contains the scripts used to build the <project> SDK. A <project> SDK is comprised of binaries, source, and developer documentation. |
runtime | This directory contains the scripts used to build the <project> runtime. The <project> runtime component contains binaries only. |
examples | This directory contains the scripts used to build the <project> Examples. The <project> Examples contain binaries and source. |
tests | This directory contains the scripts used to build the <project> Automated testing environment. This test framework can be used to run JUnit plugin tests on a <project> SDK from the command line. |
Ant
Properties Settings in a component's build.properties
The following
properties are pre-defined in the build.properties file for the specified component.
They can be overridden by setting them at the command line at build time or by
changing them directly in the component's build.properties file.
Name | Description |
baseos,basews,basearch | The os, ws and arch values of a pre-built eclipse component being compiled against. See list of possible values in the table of build configurations. |
baseLocation | A directory separate from buildDirectory which contains pre-built plugins and features against which to compile. The basedirectory must not contain any features, plugins or fragments which are already or will be located in the buildDirectory (see below). |
bootclasspath | Sets the value for the attribute "bootclasspath" in calls to the Ant <javac> task in a plugins' build.xml. Default set to ${java.home}/lib/rt.jar. |
buildDirectory | The absolute path to a working directory where the source for the build will be exported, where scripts will be generated and where the end products of the build will be located. On Windows systems, the path length should not exceed thirty characters due to possible path length limitations when compiling some classes. |
buildId | The build name. Default set to "build". |
buildLabel | Refers to the name of the directory which will contain the end result of the build. Default set to ${buildType}.${buildId}, ie."I.build". This directory will be created inside the location specified by the ${buildDirectory} property. |
buildType | Letters I, N, S, R or M are
used to identify builds as being one of the following: If set to N, all source will be checked out from the HEAD stream. In all other cases, tags as specifed in map files will be used when exporting plugins to the buildDirectory. |
collPlace | The directory relative to ${buildLabel} in which built features and plugins are gathered. Default set to ".". |
collBase | The directory relative to ${buildLabel} in which to execute zip of the ${collPlace}directory and configuration specific root files. |
configs | An ampersand separated list of configurations to
build where a configuration is specified as <os>,<ws>,<arch>. |
javacDebugInfo | Sets the value for the attribute "debug" in calls to the Ant <javac> task in a plugins' build.xml. Default set to on. |
javacFailOnError | Sets the value for the attribute "failonerror" in calls to the Ant <javac> task in a plugins' build.xml. Build will continue even if there are compilation errors when this is set to false. |
javacSource | Sets the value for the attribute "source" in calls to the Ant <javac> task in a plugins' build.xml. Default set to 1.3. |
javacTarget | Sets the value for the attribute "target" in calls to the Ant <javac> task in a plugins' build.xml. Default set to 1.1. |
javacVerbose | Sets the value for the attribute "verbose" in calls to the Ant <javac> task in a plugins' build.xml. Default set to true. |
mapVersionTag | Sets the tag attribute in a call to the Ant <cvs> task to check out org.eclipse.<project>.releng, the map file project on dev.eclipse.org used in the build. The default is "HEAD" Can
be set to a specific tag to download the map files used for a previous integration
build. Typically, these tags are in the form "v<build id in About dialog>"
for example "v200307110800" will checkout the map files used to run
the integration at the specified date/time. These scripts work with builds >
?? |
timestamp | A timestamp used to fill in value for buildid in about.mappings files. The timestamp is also used to tag the org.eclipse.<project>.releng project on dev.eclipse.org only when an appropriate value for mapCvsRoot is provided and when the tagMaps Ant property is set. |
zipargs | Arguments to send to the zip executable. ie. zipargs=-y on Linux preserves symbolic links. |
<project> Build Configurations
A configuration refers to the combination
of the operating system, windowing system and processor architecture for which
the component is intended. Currently, all <project> components are platform
independent.
Build SDK including javadoc on Windows
Build
Runtime component on Linux
Build test component in a
directory containing a previous SDK buildDirectory
Building
examples against a <project> SDK installed in eclipse on Windows
Build Windows SDK component with javadoc generation
on Windows
java -cp ..\org.eclipse.releng.basebuilder\startup.jar
org.eclipse.core.launcher.Main -application org.eclipse.ant.core.antRunner -buildfile
build.xml -Dbuilder=sdk -Dbootclasspath=C:\JRE131\lib\rt.jar -Djavacfailonerror=true
-DjavacVerbose=false -DbuildDirectory=c:\mybuild\eclipse
This builds
a <project> SDK in the directory c:\mybuild\eclipse. "-DjavaVerbose=false"
indicates that no compile logs will be generated and "-Djavacfailonerror=true"
will cause the build to fail if there are any compile errors.
Build <project> runtime component on Linux
java -cp ../org.eclipse.releng.basebuilder/startup.jar org.eclipse.core.launcher.Main -application org.eclipse.ant.core.antRunner -buildfile build.xml -Dbuilder=runtime -DbuildDirectory=/builds/runtime/eclipse
This
builds a <project> runtime in the directory "/builds/runtime/eclipse".
Build test component in a directory containing
a source from a previous SDK build on Windows
java -cp ..\org.eclipse.releng.basebuilder\startup.jar org.eclipse.core.launcher.Main -application org.eclipse.ant.core.antRunner -buildfile build.xml -Dbuilder=tests -Dbootclasspath=C:\JRE131\lib\rt.jar -DbuildDirectory=c:\builds\sdk\eclipse -Djavacfailonerror=true
This builds an the <project> test
plugins in the same directory where an SDK was previously built. The build will
fail if there are compile errors.
Building
examples against a <project> SDK installed in eclipse on Windows
java -cp ..\org.eclipse.releng.basebuilder\startup.jar org.eclipse.core.launcher.Main -application org.eclipse.ant.core.antRunner -buildfile build.xml -Dbuilder=examples -Dbootclasspath=C:\JRE131\lib\rt.jar -DbuildDirectory=c:\examples\eclipse -DbaseLocation=c:\eclipse -Dbaseos=win32 -Dbasews=win32 -Dbasearch=x86 -Djavacfailonerror=true
This
builds <project> examples in the directory c:\examples against a <project>
SDK installed in eclipse in the directory c:\examples\eclipse. The build will
fail if there are compile errors.