Initial commit
This commit is contained in:
@@ -0,0 +1,89 @@
|
||||
###############################################################################
|
||||
# Copyright (c) 2003, 2004 IBM Corporation and others.
|
||||
# All rights reserved. This program and the accompanying materials
|
||||
# are made available under the terms of the Common Public License v1.0
|
||||
# which accompanies this distribution, and is available at
|
||||
# http://www.eclipse.org/legal/cpl-v10.html
|
||||
#
|
||||
# Contributors:
|
||||
# IBM Corporation - initial API and implementation
|
||||
###############################################################################
|
||||
#####################
|
||||
# Parameters describing how and where to execute the build.
|
||||
# Typical users need only update the following properties:
|
||||
# baseLocation - where things you are building against are installed
|
||||
# bootclasspath - The base jars to compile against (typicaly rt.jar)
|
||||
# configs - the list of {os, ws, arch} configurations to build.
|
||||
#
|
||||
# Of course any of the settings here can be overridden by spec'ing
|
||||
# them on the command line (e.g., -DbaseLocation=d:/eclipse
|
||||
|
||||
############# CVS CONTROL ################
|
||||
# The CVS tag to use when fetching the map files from the repository
|
||||
mapVersionTag=HEAD
|
||||
|
||||
# The CVS tag to use when fetching elements to build. By default the
|
||||
# builder will use whatever is in the maps. Use this value to override
|
||||
# for example, when doing a nightly build out of HEAD
|
||||
# fetchTag=HEAD
|
||||
|
||||
|
||||
############## BUILD / GENERATION CONTROL ################
|
||||
# The directory into which the build elements will be fetched and where
|
||||
# the build will take place.
|
||||
buildDirectory=build
|
||||
|
||||
# Type of build. Used in naming the build output. Typically this value is
|
||||
# one of I, N, M, S, ...
|
||||
buildType=I
|
||||
|
||||
# ID of the build. Used in naming the build output.
|
||||
buildId=TestBuild
|
||||
|
||||
# Label for the build. Used in naming the build output
|
||||
buildLabel=${buildType}.${buildId}
|
||||
|
||||
# Timestamp for the build. Used in naming the build output
|
||||
timestamp=007
|
||||
|
||||
# Base location for anything the build needs to compile against. For example,
|
||||
# when building GEF, the baseLocation should be the location of a previously
|
||||
# installed Eclipse against which the GEF code will be compiled.
|
||||
baseLocation=
|
||||
|
||||
#Os/Ws/Arch/nl of the eclipse specified by baseLocation
|
||||
#baseos
|
||||
#basews
|
||||
#basearch
|
||||
#basenl
|
||||
|
||||
# The location underwhich all of the build output will be collected.
|
||||
collectingFolder=eclipse
|
||||
|
||||
# The prefix that will be used in the generated archive.
|
||||
archivePrefix=eclipse
|
||||
|
||||
# The list of {os, ws, arch} configurations to build. This
|
||||
# value is a '&' separated list of ',' separate triples. For example,
|
||||
# configs=win32,win32,x86 & linux,motif,x86
|
||||
# By default the value is *,*,*
|
||||
#configs=*,*,*
|
||||
|
||||
#Arguments to send to the zip executable
|
||||
#zipArgs=
|
||||
|
||||
############# JAVA COMPILER OPTIONS ##############
|
||||
# The location of the Java jars to compile against. Typically the rt.jar for your JDK/JRE
|
||||
bootclasspath=d:/ibm1.3.1/jre/lib/rt.jar
|
||||
|
||||
# Whether or not to include debug info in the output jars
|
||||
javacDebugInfo=false
|
||||
|
||||
# Whether or not to fail the build if there are compiler errors
|
||||
javacfailonerror=true
|
||||
|
||||
# The version of the source code
|
||||
#javaSource=1.3
|
||||
|
||||
# The version of the byte code targeted
|
||||
#javacTarget=1.1
|
||||
@@ -0,0 +1,112 @@
|
||||
<project name="Build All Elements" default="main">
|
||||
|
||||
<!-- ===================================================================== -->
|
||||
<!-- Global properties. See the build.properties for information on -->
|
||||
<!-- the properties which callers can control. -->
|
||||
<!-- ===================================================================== -->
|
||||
<property name="builderDirectory" location="${builder}"/>
|
||||
<property name="buildProperties" location="${builder}/build.properties"/>
|
||||
<property file="${buildProperties}"/>
|
||||
<property name="customTargets" location="${builderDirectory}/customTargets.xml"/>
|
||||
<property name="genericTargets" location="genericTargets.xml"/>
|
||||
|
||||
<!-- ===================================================================== -->
|
||||
<!-- main entry point to setup, fetch, generate, build etc. Use -->
|
||||
<!-- the customTargets.xml to modify the build behaviour. -->
|
||||
<!-- ===================================================================== -->
|
||||
|
||||
<!-- ******* add in the descriptions for each of the top level targets to teh target decl -->
|
||||
<target name="main" description="the main build target">
|
||||
<antcall target="preBuild" />
|
||||
<antcall target="fetch" />
|
||||
<antcall target="generate" />
|
||||
<antcall target="process" />
|
||||
<antcall target="assemble" />
|
||||
<antcall target="postBuild" />
|
||||
</target>
|
||||
|
||||
<!-- ===================================================================== -->
|
||||
<!-- Steps to do before starting the build. Typical setup includes -->
|
||||
<!-- fetching the map files and building the directory. -->
|
||||
<!-- ===================================================================== -->
|
||||
<target name="preBuild">
|
||||
<mkdir dir="${buildDirectory}" />
|
||||
<ant antfile="${customTargets}" target="preSetup" />
|
||||
<ant antfile="${customTargets}" target="getMapFiles" />
|
||||
<concat destfile="${buildDirectory}/directory.txt" fixlastline="yes">
|
||||
<fileset dir="${buildDirectory}" includes="maps/**/*.map"/>
|
||||
</concat>
|
||||
<ant antfile="${customTargets}" target="postSetup" />
|
||||
</target>
|
||||
|
||||
<!-- ===================================================================== -->
|
||||
<!-- Fetch the elements identified in the customTargets -->
|
||||
<!-- ===================================================================== -->
|
||||
<target name="fetch">
|
||||
<ant antfile="${customTargets}" target="preFetch"/>
|
||||
<!-- Generates and then execute the fetch scripts for each build element-->
|
||||
<ant antfile="${customTargets}" target="allElements">
|
||||
<property name="target" value="fetchElement" />
|
||||
</ant>
|
||||
|
||||
<ant antfile="${customTargets}" target="postFetch"/>
|
||||
</target>
|
||||
|
||||
<!-- ===================================================================== -->
|
||||
<!-- Generate the build scripts for each element identified in the customTargets -->
|
||||
<!-- ===================================================================== -->
|
||||
<target name="generate">
|
||||
<ant antfile="${customTargets}" target="preGenerate"/>
|
||||
<!-- Generate the build.xml for each build element-->
|
||||
<ant antfile="${customTargets}" target="allElements">
|
||||
<property name="target" value="generateScript" />
|
||||
</ant>
|
||||
<ant antfile="${customTargets}" target="postGenerate"/>
|
||||
</target>
|
||||
|
||||
<!-- ===================================================================== -->
|
||||
<!-- Run the build scripts for each element identified in the customTargets -->
|
||||
<!-- ===================================================================== -->
|
||||
<target name="process">
|
||||
<!-- Run custom tasks before processing, i.e. creating source build zip files -->
|
||||
<ant antfile="${customTargets}" target="preProcess" />
|
||||
|
||||
<!-- Process all of the build elements-->
|
||||
<ant antfile="${customTargets}" target="allElements">
|
||||
<property name="target" value="processElement" />
|
||||
</ant>
|
||||
|
||||
<!-- Run custom tasks after compiling, i.e. reporting compile errors -->
|
||||
<ant antfile="${customTargets}" target="postProcess" />
|
||||
</target>
|
||||
|
||||
<!-- ===================================================================== -->
|
||||
<!-- Assemble the build elements into final distributions -->
|
||||
<!-- ===================================================================== -->
|
||||
<target name="assemble">
|
||||
<ant antfile="${customTargets}" target="preAssemble"/>
|
||||
<ant antfile="${customTargets}" target="allElements">
|
||||
<property name="target" value="assembleElement"/>
|
||||
</ant>
|
||||
<ant antfile="${customTargets}" target="postAssemble"/>
|
||||
</target>
|
||||
|
||||
<!-- ===================================================================== -->
|
||||
<!-- Do any steps required after the build (e.g., posting, testing, ...) -->
|
||||
<!-- ===================================================================== -->
|
||||
<target name="postBuild">
|
||||
<ant antfile="${customTargets}" target="postBuild" />
|
||||
</target>
|
||||
|
||||
<!-- ===================================================================== -->
|
||||
<!-- Clean the build elements. This target is here as an entry -->
|
||||
<!-- point to the customTargets. It is not called directly in the normal -->
|
||||
<!-- course of events. -->
|
||||
<!-- ===================================================================== -->
|
||||
<target name="clean">
|
||||
<ant antfile="${customTargets}" target="allElements">
|
||||
<property name="target" value="cleanElement"/>
|
||||
</ant>
|
||||
</target>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,127 @@
|
||||
<project name="Build specific targets and properties" default="noDefault" >
|
||||
|
||||
<!-- ===================================================================== -->
|
||||
<!-- Run a given ${target} on all elements being built -->
|
||||
<!-- Add on <ant> task for each top level element being built. -->
|
||||
<!-- ===================================================================== -->
|
||||
<target name="allElements">
|
||||
<ant antfile="${genericTargets}" target="${target}" >
|
||||
<property name="type" value="<feature | plugin | fragment>" />
|
||||
<property name="id" value="<element.id>" />
|
||||
</ant>
|
||||
</target>
|
||||
|
||||
<!-- ===================================================================== -->
|
||||
<!-- Targets to assemble the built elements for particular configurations -->
|
||||
<!-- These generally call the generated assemble scripts (named in -->
|
||||
<!-- ${assembleScriptName}) but may also add pre and post processing -->
|
||||
<!-- Add one target for each root element and each configuration -->
|
||||
<!-- ===================================================================== -->
|
||||
|
||||
<target name="assemble.<element.id>[.config.spec]">
|
||||
<ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
|
||||
</target>
|
||||
|
||||
<!-- ===================================================================== -->
|
||||
<!-- Check out map files from correct repository -->
|
||||
<!-- Replace values for cvsRoot, package and mapVersionTag as desired. -->
|
||||
<!-- ===================================================================== -->
|
||||
<target name="getMapFiles">
|
||||
<!-- Notify recipients that build has started.-->
|
||||
<property name="cvsRoot" value="<cvs repo locator and login info>" />
|
||||
<property name="mapVersionTag" value="HEAD" />
|
||||
<cvs
|
||||
package="<repo location of map files>"
|
||||
dest="${buildDirectory}/maps"
|
||||
tag="${mapVersionTag}"
|
||||
/>
|
||||
</target>
|
||||
|
||||
<!-- ===================================================================== -->
|
||||
<!-- Steps to do before setup -->
|
||||
<!-- ===================================================================== -->
|
||||
<target name="preSetup">
|
||||
</target>
|
||||
|
||||
<!-- ===================================================================== -->
|
||||
<!-- Steps to do after setup but before starting the build proper -->
|
||||
<!-- ===================================================================== -->
|
||||
<target name="postSetup">
|
||||
</target>
|
||||
|
||||
<!-- ===================================================================== -->
|
||||
<!-- Steps to do before fetching the build elements -->
|
||||
<!-- ===================================================================== -->
|
||||
<target name="preFetch">
|
||||
</target>
|
||||
|
||||
<!-- ===================================================================== -->
|
||||
<!-- Steps to do after fetching the build elements -->
|
||||
<!-- ===================================================================== -->
|
||||
<target name="postFetch">
|
||||
</target>
|
||||
|
||||
<!-- ===================================================================== -->
|
||||
<!-- Steps to do before generating the build scripts. -->
|
||||
<!-- ===================================================================== -->
|
||||
<target name="preGenerate">
|
||||
</target>
|
||||
|
||||
<!-- ===================================================================== -->
|
||||
<!-- Steps to do after generating the build scripts. -->
|
||||
<!-- ===================================================================== -->
|
||||
<target name="postGenerate">
|
||||
</target>
|
||||
|
||||
|
||||
<!-- ===================================================================== -->
|
||||
<!-- Steps to do before running the build.xmls for the elements being built. -->
|
||||
<!-- ===================================================================== -->
|
||||
<target name="preProcess">
|
||||
</target>
|
||||
|
||||
<!-- ===================================================================== -->
|
||||
<!-- Steps to do after running the build.xmls for the elements being built. -->
|
||||
<!-- ===================================================================== -->
|
||||
<target name="postProcess">
|
||||
</target>
|
||||
|
||||
|
||||
<!-- ===================================================================== -->
|
||||
<!-- Steps to do before running assemble. -->
|
||||
<!-- ===================================================================== -->
|
||||
<target name="preAssemble">
|
||||
</target>
|
||||
|
||||
<!-- ===================================================================== -->
|
||||
<!-- Steps to do after running assemble. -->
|
||||
<!-- ===================================================================== -->
|
||||
<target name="postAssemble">
|
||||
</target>
|
||||
|
||||
<!-- ===================================================================== -->
|
||||
<!-- Steps to do after the build is done. -->
|
||||
<!-- ===================================================================== -->
|
||||
<target name="postBuild">
|
||||
</target>
|
||||
|
||||
<!-- ===================================================================== -->
|
||||
<!-- Steps to do to test the build results -->
|
||||
<!-- ===================================================================== -->
|
||||
<target name="test">
|
||||
</target>
|
||||
|
||||
<!-- ===================================================================== -->
|
||||
<!-- Steps to do to publish the build results -->
|
||||
<!-- ===================================================================== -->
|
||||
<target name="publish">
|
||||
</target>
|
||||
|
||||
<!-- ===================================================================== -->
|
||||
<!-- Default target -->
|
||||
<!-- ===================================================================== -->
|
||||
<target name="noDefault">
|
||||
<echo message="You must specify a target when invoking this file" />
|
||||
</target>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,145 @@
|
||||
<project name="Generic Build Targets" default="noDefault">
|
||||
|
||||
<!-- Properties that must be passed to this script:
|
||||
buildDirectory
|
||||
id
|
||||
type
|
||||
ignoreTagInfo
|
||||
recursiveGeneration
|
||||
workingDirectory
|
||||
configInfo
|
||||
-->
|
||||
|
||||
<!-- ===================================================================== -->
|
||||
<!-- Setup default values -->
|
||||
<!-- configs : by default build a platform-independent configuration -->
|
||||
<!-- fetchTag : by default use the CVS tags as spec'd in directory.txt -->
|
||||
<!-- ===================================================================== -->
|
||||
<property name="configs" value="*,*,*"/>
|
||||
<property name="fetchTag" value=""/>
|
||||
<property name="buildingOSGi" value="true"/>
|
||||
<!-- ===================================================================== -->
|
||||
<!-- Fetch a single element (feature, plugin, fragment) -->
|
||||
<!-- ===================================================================== -->
|
||||
<target name="fetchElement" description="Checking out source from repository..." depends="init">
|
||||
<mkdir dir="${buildDirectory}/features"/>
|
||||
<mkdir dir="${buildDirectory}/plugins"/>
|
||||
<eclipse.fetch
|
||||
elements="${type}@${id}"
|
||||
buildDirectory="${buildDirectory}"
|
||||
directory="${buildDirectory}/directory.txt"
|
||||
fetchTag="${fetchTag}"
|
||||
configInfo="${configs}"
|
||||
/>
|
||||
|
||||
<!-- Run generated fetch script -->
|
||||
<ant antfile="${buildDirectory}/fetch_${id}.xml">
|
||||
<!-- ************ should not have to spec these *************** -->
|
||||
<property name="featureOnly" value="true"/>
|
||||
<property name="featureAndPlugins" value="true"/>
|
||||
<property name="featuresRecursively" value="true"/>
|
||||
</ant>
|
||||
</target>
|
||||
|
||||
<!-- ===================================================================== -->
|
||||
<!-- Clean previously built elements -->
|
||||
<!-- ===================================================================== -->
|
||||
<target name="cleanElement" description="Scrubbing features and plugins of old jars..." depends="init">
|
||||
<echo message="${elementPath}"/>
|
||||
<ant antfile="build.xml" dir="${elementPath}" target="clean"/>
|
||||
</target>
|
||||
|
||||
<!-- ===================================================================== -->
|
||||
<!-- Generate a build.xml file for an element -->
|
||||
<!-- ===================================================================== -->
|
||||
<target name="generateScript" description="Generating build scripts..." depends="init">
|
||||
<eclipse.buildScript
|
||||
elements="${type}@${id}"
|
||||
buildDirectory="${buildDirectory}"
|
||||
configInfo="${configs}"
|
||||
baseLocation="${baseLocation}"
|
||||
buildingOSGi="${buildingOSGi}"
|
||||
/>
|
||||
</target>
|
||||
|
||||
<!-- ===================================================================== -->
|
||||
<!-- Run build.xml for a single element-->
|
||||
<!-- ===================================================================== -->
|
||||
<target name="processElement" description="Processing build scripts..." depends="init">
|
||||
<ant antfile="build.xml" dir="${elementPath}" target="build.jars">
|
||||
<property name="target" value="build.jars"/>
|
||||
</ant>
|
||||
</target>
|
||||
|
||||
<!-- **********************
|
||||
1) the gather targets do more than just gather. These are packaging targets.
|
||||
We need to continue ot separate the two concepts (gather and package) as
|
||||
the packaging is different if we wanted to create an update site packaging
|
||||
(for example). The gathers are commented out for now as the new generated
|
||||
scripts do not seem to have them.
|
||||
|
||||
2) do we really need the ws and os properties? In all cases? Do they have to be
|
||||
set here?
|
||||
-->
|
||||
|
||||
<!-- ===================================================================== -->
|
||||
<!-- Gather items listed in bin.includes -->
|
||||
<!-- ===================================================================== -->
|
||||
<target name="gatherBinaries" description="Gathering binary distribution..." depends="init">
|
||||
<!-- ant antfile="build.xml" dir="${elementPath}" target="gather.bin.parts"/ -->
|
||||
<ant antfile="build.xml" dir="${elementPath}" target="zip.distribution">
|
||||
<property name="os" value="${os}" />
|
||||
<property name="ws" value="${ws}" />
|
||||
</ant>
|
||||
</target>
|
||||
|
||||
<!-- ===================================================================== -->
|
||||
<!-- Gather source for a build element -->
|
||||
<!-- ===================================================================== -->
|
||||
<target name="gatherSources" description="Gathering source distribution..." depends="init">
|
||||
<!--suspect: this call is required to create the *.src.zip inside each plugin-->
|
||||
<ant antfile="build.xml" dir="${elementPath}" target="build.sources">
|
||||
<property name="os" value="${os}" />
|
||||
<property name="ws" value="${ws}" />
|
||||
</ant>
|
||||
<ant antfile="build.xml" dir="${elementPath}" target="zip.sources">
|
||||
<property name="os" value="${os}" />
|
||||
<property name="ws" value="${ws}" />
|
||||
</ant>
|
||||
</target>
|
||||
|
||||
<!-- ===================================================================== -->
|
||||
<!-- Gather log files for an element -->
|
||||
<!-- Suspect: We just unzip these right away -->
|
||||
<!-- ===================================================================== -->
|
||||
<target name="gatherLogs" description="Gathering build logs..." depends="init">
|
||||
<ant antfile="build.xml" dir="${elementPath}" target="zip.logs" >
|
||||
<property name="buildDirectory" value="${buildDirectory}" />
|
||||
</ant>
|
||||
</target>
|
||||
|
||||
<!-- ===================================================================== -->
|
||||
<!-- Default target -->
|
||||
<!-- ===================================================================== -->
|
||||
<target name="noDefault">
|
||||
<echo message="This file must be called with explicit targets" />
|
||||
</target>
|
||||
|
||||
<!-- ===================================================================== -->
|
||||
<!-- Assemble one build element -->
|
||||
<!-- ===================================================================== -->
|
||||
<target name="assembleElement" description="Assembling the build..." depends="init">
|
||||
<ant antfile="assemble.${id}.all.xml" dir="${buildDirectory}"/>
|
||||
</target>
|
||||
|
||||
<!-- ===================================================================== -->
|
||||
<!-- Miscellaneous helper targets -->
|
||||
<!-- ===================================================================== -->
|
||||
<target name="init">
|
||||
<condition property="elementPath" value="${buildDirectory}/plugins/${id}">
|
||||
<equals arg1="${type}" arg2="fragment" />
|
||||
</condition>
|
||||
<property name="elementPath" value="${buildDirectory}/${type}s/${id}" />
|
||||
</target>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,62 @@
|
||||
<project name="packager" default="main" basedir=".">
|
||||
<target name="init">
|
||||
<mkdir dir="${workingDirectory}"/>
|
||||
<mkdir dir="${downloadDirectory}"/>
|
||||
<mkdir dir="${tempDirectory}"/>
|
||||
</target>
|
||||
|
||||
<target name="retrieveMapFiles">
|
||||
<available property="mapsFetched" file="${workingDirectory}/all.maps"/>
|
||||
<ant antfile="${customTargets}" target="getMapFiles" />
|
||||
<concat destfile="${workingDirectory}/all.maps">
|
||||
<fileset dir="${downloadDirectory}" includes="**/*.map"/>
|
||||
</concat>
|
||||
</target>
|
||||
|
||||
<!-- take the content of all.maps, retrieve the files according to the filtering options (config, content),
|
||||
and generate a directory.txt for the rest of the process using config as a key, and containing the name of the zip and the directory -->
|
||||
<target name="retrieveFiles">
|
||||
<eclipse.fetchFilesGenerator map="${workingDirectory}/all.maps"
|
||||
workingDirectory="${workingDirectory}"
|
||||
configInfo="${config}"
|
||||
contentFilter="${contentFilter}"
|
||||
componentFilter="${componentFilter}"/>
|
||||
<ant antfile="fetch.xml" dir="${workingDirectory}" />
|
||||
</target>
|
||||
|
||||
<!-- Process the directory.txt to create unzipper.xml, and run unzipper.xml-->
|
||||
<target name="prepareResources">
|
||||
<eclipse.unzipperBuilder workingDirectory="${workingDirectory}"
|
||||
configInfo="${config}"
|
||||
packagePropertyFile="${packagingPropertyFile}"/>
|
||||
<ant antfile="${workingDirectory}/unzipper.xml"/>
|
||||
</target>
|
||||
|
||||
<!-- Generate an assemble script (assemble.xml) for the given features -->
|
||||
<target name="generateAssembleScripts">
|
||||
<eclipse.assembler featureList="${featureList}"
|
||||
workingDirectory="${workingDirectory}"
|
||||
configInfo="${config}"
|
||||
baseLocation="${tempDirectory}/${featurePaths}"
|
||||
packagePropertyFile="${packagingPropertyFile}" />
|
||||
</target>
|
||||
|
||||
<!-- Call the assemble.xml script -->
|
||||
<target name="callAssembleScripts">
|
||||
<ant antfile="assemble.xml" dir="${workingDirectory}"/>
|
||||
</target>
|
||||
|
||||
|
||||
<target name="main" description="Start the packager for a given config">
|
||||
<property file="${packagingInfo}/packager.properties"/>
|
||||
<property name="customTargets" location="${packagingInfo}/customTargets.xml"/>
|
||||
<property name="packagingPropertyFile" location="${packagingInfo}/${packagingProperties}"/>
|
||||
|
||||
<antcall target="init"/>
|
||||
<antcall target="retrieveMapFiles"/>
|
||||
<antcall target="retrieveFiles"/>
|
||||
<antcall target="prepareResources"/>
|
||||
<antcall target="generateAssembleScripts"/>
|
||||
<antcall target="callAssembleScripts"/>
|
||||
</target>
|
||||
</project>
|
||||
Reference in New Issue
Block a user