Build - test+site changes
diff --git a/releng.wtpbuilder/components/jsf.tests/build.properties b/releng.wtpbuilder/components/jsf.tests/build.properties
new file mode 100644
index 0000000..7a336f1
--- /dev/null
+++ b/releng.wtpbuilder/components/jsf.tests/build.properties
@@ -0,0 +1,77 @@
+###############################################################################
+# Copyright (c) 2006 Oracle.
+# 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:
+# Oracle - 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
+
+############## BUILD / GENERATION CONTROL ################
+# The directory into which the build elements will be fetched and where
+# the build will take place.
+#buildDirectory=c:/dev/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=Build
+
+# 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=c:/dev/eclipse
+
+# The location underwhich all of the build output will be collected.
+# This is a subdirectory of $buildDirectory
+# Set collectingFolder and archivePrefix to . if you want to create archives without
+# trailing eclipse in the paths of the included files
+collectingFolder=eclipse
+
+# The prefix that will be used in the generated archive.
+# Does not make sense to use a different archivePrefix than collectingFolder,
+# because zip wouldn't find any files to include into the target zip otherwise
+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
+#bootclasspath=D:\\java\\j2sdk1.4.2_05\\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
diff --git a/releng.wtpbuilder/components/jsf.tests/customTargets.xml b/releng.wtpbuilder/components/jsf.tests/customTargets.xml
new file mode 100644
index 0000000..5237825
--- /dev/null
+++ b/releng.wtpbuilder/components/jsf.tests/customTargets.xml
@@ -0,0 +1,207 @@
+<project name="Build specific targets and properties" default="noDefault" >
+ <property name="postingDirectory" value="${buildDirectory}" />
+
+<!-- ===================================================================== -->
+<!-- Run a given ${target} on all elements being built -->
+<!-- Add on <ant> task for each top level element being built. -->
+<!-- ===================================================================== -->
+<target name="allElements">
+ <echo message="Target: ${target} " />
+ <echo message="basedir: ${basedir}" />
+ <echo message="component: ${component}" />
+ <echo message="buildDirectory: ${buildDirectory}" />
+ <echo message="baseLocation: ${baseLocation}" />
+
+ <ant antfile="${genericTargets}" target="${target}" >
+ <property name="type" value="feature" />
+ <property name="id" value="org.eclipse.wtp.jsf.tests.feature" />
+ </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.org.eclipse.wtp.jsf.tests.feature">
+ <property name="archiveName" value="wtp-jsf-Automated-Tests-${buildLabel}.zip" />
+
+ <ant antfile="${assembleScriptName}" dir="${buildDirectory}" />
+
+ <mkdir dir="${postingDirectory}/${buildLabel}/checksum" />
+ <checksum file="${postingDirectory}/${buildLabel}/wtp-jsf-Automated-Tests-${buildLabel}.zip" property="md5" />
+
+ <echo message="${md5} *wtp-jsf-Automated-Tests-${buildLabel}.zip"
+ file="${postingDirectory}/${buildLabel}/checksum/wtp-jsf-Automated-Tests-${buildLabel}.zip.md5" />
+ <echo message="${md5}"
+ file="${postingDirectory}/${buildLabel}/checksum/wtp-jsf-Automated-Tests-${buildLabel}.zip.md5antformat" />
+</target>
+
+
+<!-- ===================================================================== -->
+<!-- Check out map files from correct repository -->
+<!-- Replace values for cvsRoot, package and mapVersionTag as desired. -->
+<!-- ===================================================================== -->
+<target name="checkLocal">
+ <available property="mapsLocal" file="${buildDirectory}/maps/releng-jsf" />
+</target>
+
+<target name="getMapFiles" depends="checkLocal" unless="mapsLocal">
+
+ <!-- *** change the repo info -->
+ <property name="mapCvsRoot" value=":${cvsProtocol}:${cvsUser}@${cvsServer}:${cvsRoot}" />
+ <property name="mapVersionTag" value="HEAD" />
+ <property name="cvsPackage" value="releng-jsf" />
+ <echo message="${mapCvsRoot} ${mapVersionTag} "/>
+ <echo message="cvsPackage = ${cvsPackage} "/>
+
+ <cvs cvsRoot="${mapCvsRoot}" package="${cvsPackage}" dest="${buildDirectory}/maps" tag="${mapVersionTag}" />
+ <!--tag the map files project-->
+ <antcall target="tagMapFiles">
+ <param name="mapCvsRoot" value="${mapCvsRoot}" />
+ </antcall>
+</target>
+
+<target name="tagMapFiles" if="tagMaps">
+ <cvs cvsRoot="${mapCvsRoot}" dest="${buildDirectory}/maps" command="tag v${buildType}${timestamp}" />
+</target>
+
+<!-- ===================================================================== -->
+<!-- Steps to do before setup -->
+<!-- ===================================================================== -->
+<target name="preSetup">
+</target>
+
+<!-- ===================================================================== -->
+<!-- Steps to do after setup but before starting the build proper -->
+<!-- ===================================================================== -->
+<target name="postSetup">
+ <dirname file="${ant.file}" property="component.dir" />
+ <echo message="ant.file: ${ant.file}" />
+ <echo message="component.dir: ${component.dir}" />
+
+ <ant antfile="${component.dir}/dependency.xml" target="get">
+ <property name="dependency.properties" value="${buildDirectory}/maps/releng-jsf/maps/dependencies.properties" />
+ <property name="base.install.dir" value="${buildRoot}" />
+ </ant>
+ <!--fetch the additional pieces to build JSF tests -->
+ <property name="featureOnly" value="false" />
+ <property name="featureAndPlugins" value="true" />
+ <property name="featuresRecursively" value="true" />
+
+ <ant antfile="${genericTargets}" dir="${pde.build.scripts}" target="fetchElement">
+ <property name="type" value="feature" />
+ <property name="id" value="org.eclipse.wtp.jsf.tests.feature" />
+ </ant>
+</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">
+
+ <!-- create zipped up versions for update site -->
+ <property name="UpdateSiteStagingLocation" value="${buildDirectory}/updateSite" />
+ <antcall target="generateUpdateSite" />
+</target>
+
+<target name="generateUpdateSite">
+ <!-- Create the directory structure -->
+ <mkdir dir="${UpdateSiteStagingLocation}" />
+ <mkdir dir="${UpdateSiteStagingLocation}/features" />
+ <mkdir dir="${UpdateSiteStagingLocation}/plugins" />
+ <!-- Build the jar files -->
+ <antcall target="allElements">
+ <param name="genericTargets" value="${builder}/customTargets.xml" />
+ <param name="target" value="updateSiteExport" />
+ </antcall>
+ <antcall target="copySiteXmlFromCvs" />
+ <antcall target="createNightlyBuildSiteXml" />
+</target>
+<target name="updateSiteExport">
+ <ant antfile="build.xml"
+ dir="${buildDirectory}/features/${id}/"
+ target="build.update.jar">
+ <property name="feature.destination" value="${UpdateSiteStagingLocation}/features" />
+ <property name="plugin.destination" value="${UpdateSiteStagingLocation}/plugins" />
+ </ant>
+</target>
+<target name="copySiteXmlFromCvs" unless="isNightlyBuild">
+ <!-- connect to CVS and fetch site.xml, copy to ${UpdateSiteStagingLocation}/site.xml afterwards -->
+</target>
+<target name="createNightlyBuildSiteXml" if="isNightlyBuild">
+ <!-- create ${UpdateSiteStagingLocation}/site.xml which contains only the nighlty build version -->
+</target>
+
+<!-- ===================================================================== -->
+<!-- Steps to test the build results -->
+<!-- ===================================================================== -->
+<target name="test" unless="dontRunTests">
+</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>
diff --git a/releng.wtpbuilder/components/jsf.tests/dependency.xml b/releng.wtpbuilder/components/jsf.tests/dependency.xml
new file mode 100644
index 0000000..b5b30e7
--- /dev/null
+++ b/releng.wtpbuilder/components/jsf.tests/dependency.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0"?>
+<!-- ======================================================================
+ Properties that must be passed to this script:
+ base.install.dir
+ dependencyTargets
+ local.cache.dir
+ dependency.properties
+ baseos
+ basews
+ basearch
+
+ jsf Dependencies:
+
+ ====================================================================== -->
+<project name="test" default="get">
+
+ <target name="get">
+
+ <antcall target="getAndInstall">
+ <param name="groupId" value="wtp" />
+ </antcall>
+ <antcall target="getAndInstall">
+ <param name="groupId" value="emf" />
+ </antcall>
+ <antcall target="getAndInstall">
+ <param name="groupId" value="gef" />
+ </antcall>
+ <antcall target="getAndInstall">
+ <param name="groupId" value="jem" />
+ </antcall>
+ <antcall target="getAndInstall">
+ <param name="groupId" value="eclipse" />
+ </antcall>
+ <antcall target="getAndInstall">
+ <param name="groupId" value="eclipseTestFramework" />
+ </antcall>
+
+
+ </target>
+
+ <target name="getAndInstall">
+
+ <echo message="dependencyTargets: ${dependencyTargets}" />
+
+ <ant antfile="${dependencyTargets}" target="checkDependency">
+ <property name="groupId" value="${groupId}" />
+ </ant>
+ <ant antfile="${dependencyTargets}" target="installDependency">
+ <property name="groupId" value="${groupId}" />
+ <property name="install.destination" value="${base.install.dir}" />
+ </ant>
+ </target>
+
+</project>
+