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

Difference between revisions of "DTP Releng Instructions"

(Setup)
(Generating Source Features and Plugins)
 
(12 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
__TOC__  
 
__TOC__  
  
== Description ==
+
== How to Build DTP from CVS ==
  
 
This page mainly decribes how to set up headless PDE build system for DTP and start the build.
 
This page mainly decribes how to set up headless PDE build system for DTP and start the build.
Line 9: Line 9:
  
 
1. [http://www.cvshome.org/ CVS] version 1.10 or higher.<br/>
 
1. [http://www.cvshome.org/ CVS] version 1.10 or higher.<br/>
2. [http://java.sun.com/j2se/1.4/download.html 1.4 level JDK].(Compiler JDK version of DTP 1.6 is 1.4)<br/>
+
2. [http://java.sun.com/j2se/1.4/download.html 1.4.2 level JDK]. (DTP 1.6 uses Java compiler compliance level 1.4 .)<br/>
 
3. Info-Zip [http://www.info-zip.org/pub/infozip/ zip] and unzip.<br/>
 
3. Info-Zip [http://www.info-zip.org/pub/infozip/ zip] and unzip.<br/>
 
4. [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.releng.basebuilder/ org.eclipse.releng.basebuilder].<br/>
 
4. [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.releng.basebuilder/ org.eclipse.releng.basebuilder].<br/>
Line 205: Line 205:
 
|}
 
|}
 
<br/>
 
<br/>
 +
 +
== Generating Source Features and Plugins ==
 +
 +
We use PDE tools to generate source features and source plugins automatically.
 +
Please click [http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.pde.doc.user/guide/tasks/pde_source_generation.htm here] to see how this works.
 +
 +
build.properties of sdk-all.feature and enablement-all.feature has contained the setting for generating source features.
  
 
== Build Server Directory Structure==
 
== Build Server Directory Structure==

Latest revision as of 01:51, 16 April 2008

How to Build DTP from CVS

This page mainly decribes how to set up headless PDE build system for DTP and start the build. Since the build server is a Linux server, below instructions are based on Linux environment.

Prerequisites

1. CVS version 1.10 or higher.
2. 1.4.2 level JDK. (DTP 1.6 uses Java compiler compliance level 1.4 .)
3. Info-Zip zip and unzip.
4. org.eclipse.releng.basebuilder.
5. org.eclipse.datatools.releng.builder.
6. Eclipse 3.3.2 SDK
7. EMF 2.2(emf+sdo)
8. GEF 3.3

Setup

1. Add the zip, unzip, tar, gzip and cvs executables to your path as required.
2. Add the jre/bin directory of the installed JDK to your path.
3. Check out org.eclipse.releng.basebuilder and org.eclipse.dtp.releng.builder into local server.
We recommend to use tagged version of org.eclipse.releng.basebuilder. The HEAD version is not stable and may have changes which will lead to build failure. The examples below are tested with tag version vI20070209-1006
4. Create a new directory as baseLocation.
5. Extract Eclipse SDK, EMF, GEF into baseLocation. The root folder should be plugins/ and features/.

Start the Build

cd to org.eclipse.dtp.releng.builder directory and execute the following command to start the build

  ./bootstrap.sh N

This shell script actually excutes below command, which will invode the top-level build script buildAll.xml:

  buildCommand="$antRunner -q -buildfile buildAll.xml $mail $testBuild $compareMaps 
-DmapVersionTag=$mapVersionTag -DpostingDirectory=$postingDirectory
-Dbootclasspath=$bootclasspath -DbuildType=$buildType -D$buildType=true
-DbuildId=$buildId -Dbuildid=$buildId -DbuildLabel=$buildId -Dtimestamp=$timestamp $tagMaps
-DJ2SE-1.5=$bootclasspath_15 -DlogExtension=.xml $updateSite
-Djava15-home=$bootclasspath_15 -DbuildDirectory=/home/adb/releng.dtp/src
-DbaseLocation=/home/adb/releng.dtp/baseLocation
-DgroupConfiguration=true -DjavacVerbose=true
-Dbasebuilder=/home/adb/releng.dtp/org.eclipse.releng.basebuilder
-Djvm15_home=$jvm15_home -DmapTag.properties=/home/adb/releng.dtp/org.eclipse.datatools.releng.builder/mapTag.properties
-Dbuild.date=$builddate -Dpackage.version=1.6M6-$timestamp
-DmapCvsRoot=:ext:anonymouse@dev.eclipse.org:/cvsroot/datatools
-DmapVersionTag=HEAD -DjavacTarget=1.4 -DjavacSource=1.4"

Note that, before starting the build, environment variable in bootstrap.sh and build.properties need to be set correctly according to your local server. Please seeAnt Properties Settings part.

Top-level Build Script Analysis

Let's take a look at the top-level buildAll.xml which drives the whole build actually.

       <target name="main" depends="init">
               <antcall target="buildDtpSdkAllFeature"/>
               <antcall target="buildDtpEnablementAllFeature"/>
               <antcall target="integrateDtpFeatures"/>
               <antcall target="Package"/>
               <antcall target="GenerateUpdateSite"/>
       </target>


Target buildDtpSdkAllFeature will build the component dtp.sdk.all. The fake top-level feature org.eclipse.datatools.sdk-all.feature will drive the building of this component.

    <target name="buildDtpSdkAllFeature">
        <ant antfile="build.xml" dir="${basedir}">
            <property name="component" value="${eclipse.build.configs}/dtp.sdk.all" />
        </ant>
    </target>


Target buildDtpEnablementAllFeature will build the component dtp.enablement.all. The fake top-level feature org.eclipse.datatools.enablement-all.feature will drive the building of this component.

    <target name="buildDtpEnablementFeature">
        <ant antfile="build.xml" dir="${basedir}">
            <property name="component" value="${eclipse.build.configs}/dtp.enablement" />
        </ant>
    </target>

Target integrateDtpFeatures will unzip the output packages of above two component's build into same directory.

Target Package will generate the final delivery dtp package: sdk package and non-sdk package, including repackage the source plugins.

Target GenerateUpdateSite will generate the update site.

Component Introduction

From a user's perspective, DTP has two top level features: the SDK and Enablement. From a build perspective, Enablement depends on most of what is contained in the SDK feature.

So we have two component in org.eclipse.datatools.releng.builder and the build order is dtp.sdk.all -> dtp.enablement.all.

Component Description

dtp.sdk.all

This component will build the fake top-level feature org.eclipse.datatools.sdk-all.feature.
It includes the sub-feature:
org.eclipse.datatools.sdk.feature
org.eclipse.datatools.intro
org.eclipse.datatools.doc.user
source features

org.eclipse.datatools.sdk-all.feature will be deleted during packaging process.
The property file and build script locate in directory org.eclipse.datatools.releng.builder/eclipse/buildConfigs/dtp.sdk.all/

dtp.enablement.all

This component will build the fake top-level feature org.eclipse.datatools.enablement-all.feature
It includes the sub-feature:
org.eclipse.datatools.enablement.feature
source features of enablement features

org.eclipse.datatools.enablement-all.feature will be deleted during packaging process.
The property file and build script locate in directory org.eclipse.datatools.releng.builder/eclipse/buildConfigs/dtp.enablement.all/


Ant Properties Settings

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. Value set in build.properties will be overriden by the one set in command line (or in bootstrap.sh).

Name Description

baseos,basews,basearch

The os, ws and arch values of a pre-built eclipse component being compiled against. Currently DTP use *,*,*

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 path length limitations when compiling some classes in Eclipse.

buildId

The build name. Default set to timestamp.

buildLabel

Refers to the name of the directory which will contain the end result of the build. Default set to v${buildId}, ie."vbuild". This directory will be created inside the location specified by the ${buildDirectory} property.

buildType

Letters I, N, S, R or M are used in Eclipse builds to identify builds as being one of the following:


I - Integration
N - Nightly
S - Stable
R - Release
M - Maintenance

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.

configs

DTP use *,*,* in the dtp builder, which indicates platform independence.

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. DTP set both javacSource and javacSource to 1.4

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. DTP set both javacSource and javacTarget to 1.4

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.datatools.releng, the map file project on dev.eclipse.org used in the build.

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 "r16_<date/timestamp>" for example "r16_v20030711-0800" will checkout the map files used to run the integration at the specified date/time.

zipargs

Arguments to send to the zip executable. ie. zipargs=-y on Linux preserves symbolic links.


Generating Source Features and Plugins

We use PDE tools to generate source features and source plugins automatically. Please click here to see how this works.

build.properties of sdk-all.feature and enablement-all.feature has contained the setting for generating source features.

Build Server Directory Structure

Path Purpose/Description

/home/adb/releng.dtp/

Working directory of daily build

/home/adb/releng.dtp/src/maps

location to store Map files

/home/adb/releng.dtp/src/plugins

location to store DTP plugins checked out from CVS

/home/adb/releng.dtp/src/features

location to store DTP features checked out from CVS

/home/adb/releng.dtp/org.eclipse.releng.basebuilder

where PDE basebuilder locates

/home/adb/releng.dtp/org.eclipse.dtp.releng.builder

where org.eclipse.dtp.releng.builderlocates

/home/adb/releng.dtp/output

the output directory where exported and packaged zip can be found

/home/adb/releng.dtp/baseLocation

baselocation where Eclipse platform/EMF/GEF prerequisites locate

/home/adb/releng.dtp/baseLocation/plugins

where prerequisites plugins locate

/home/adb/releng.dtp/baseLocation/features

where prerequisites features locate

Back to the top