Fixes for S-Builds
diff --git a/archive/releng.builder/tools/cruise/checkout.xml b/archive/releng.builder/tools/cruise/checkout.xml
index 31e7cbc..c50b9d7 100644
--- a/archive/releng.builder/tools/cruise/checkout.xml
+++ b/archive/releng.builder/tools/cruise/checkout.xml
@@ -23,7 +23,7 @@
 		<echo message="Version tag for releng builder is: ${wtpBuilderVersion}" />
 
 		<delete dir="${codir}/releng.builder" failonerror="false" />
-		<cvs cvsRoot="${mapCvsRoot}" package="${releng.builder}" dest="${codir}" tag="${wtpBuilderVersion}" />
+		<cvs cvsRoot="${mapCvsRoot}" package="${releng.wtpbuilder}" dest="${codir}" tag="${wtpBuilderVersion}" />
 
 	</target>
 
diff --git a/archive/releng.builder/tools/cruise/config.xml b/archive/releng.builder/tools/cruise/config.xml
index 01dc801..4dadbb9 100644
--- a/archive/releng.builder/tools/cruise/config.xml
+++ b/archive/releng.builder/tools/cruise/config.xml
@@ -126,6 +126,54 @@
 		</publishers>
 	</project>
 	
+	<project name="wtp-S" buildafterfailed="true">
+		<!-- Bootstrappers are run every time the build runs,
+			*before* the modification checks -->
+		<bootstrappers>
+			<currentbuildstatusbootstrapper
+				file="logs/wtp-S/buildstatus.txt" />
+		</bootstrappers>
+
+		<!-- Defines where cruise looks for changes, to decide whether to run the build -->
+		<modificationset quietperiod="120">
+			<cvs
+				cvsroot=":pserver:anonymous@dev.eclipse.org:/home/webtools"
+				tag="HEAD"
+				localworkingcopy="/home/build-home/build-node/checkout/wtp-S" />
+		</modificationset>
+
+		<schedule interval="3600">
+			<ant
+				antscript="/home/build-home/build-node/builder/releng.builder/tools/cruise/ant.sh"
+				buildfile="committer.xml" target="Build" uselogger="false"
+				usedebug="false"
+				antworkingdir="/home/build-home/build-node/builder/releng.builder/tools/cruise">
+				<property name="buildType" value="S"/>
+				<property name="buildId" value="1.0M8"/>
+				<property name="mapVersionTag" value="HEAD"/>
+				<property name="build.distribution" value="wtp"/>
+			</ant>
+		</schedule>
+
+
+
+		<!-- directory to write build logs to -->
+		<log dir="logs/wtp-S"></log>
+
+		<!-- Publishers are run *after* a build completes -->
+		<publishers>
+			<currentbuildstatuspublisher
+				file="logs/wtp-I/buildstatus.txt" />
+			<email mailhost="localhost"
+				returnaddress="buildmaster@lomboz.org" skipusers="true"
+				subjectprefix="[wtp-R1.0-S-build]"
+				buildresultsurl="http://buildserver.lomboz.org:8080/cruisecontrol/buildresults/wtp-S">
+				<failure address="wtp-dev@eclipse.org" />
+				<always address="wtp-releng@eclipse.org" />
+			</email>
+		</publishers>
+	</project>
+	
 	<project name="wtp-M" buildafterfailed="true">
 		<!-- Bootstrappers are run every time the build runs,
 			*before* the modification checks -->
diff --git a/releng.wtpbuilder/distribution/wtp.site/build.xml b/releng.wtpbuilder/distribution/wtp.site/build.xml
index ac4c3cd..910e15e 100644
--- a/releng.wtpbuilder/distribution/wtp.site/build.xml
+++ b/releng.wtpbuilder/distribution/wtp.site/build.xml
@@ -10,6 +10,7 @@
 			<jvmarg value="-Dbuild.home=${build.home}" />
 			<jvmarg value="-Dbuild.trial=${build.trial}" />
 			<jvmarg value="-DbuildType=${buildType}" />
+			<jvmarg value="-DbuildId=${buildId}" />
 			<jvmarg value="-DjavacDebugInfo=on" />
 			<jvmarg value="-DmapVersionTag=${mapVersionTag}" />
 			<jvmarg value="-Dbuild.distribution=${build.distribution}" />
diff --git a/releng.wtpbuilder/distribution/wtp.site/publish.xml b/releng.wtpbuilder/distribution/wtp.site/publish.xml
index 1b65bef..f59c02f 100644
--- a/releng.wtpbuilder/distribution/wtp.site/publish.xml
+++ b/releng.wtpbuilder/distribution/wtp.site/publish.xml
@@ -113,7 +113,7 @@
 
 	<target name="S">
 		<replace file="${result}/${indexFileName}" token="%wtpandprereqs%" value=" " />
-		<replace file="${result}/${indexFileName}" token="@type@" value="Integration" />
+		<replace file="${result}/${indexFileName}" token="@type@" value="Stable" />
 	</target>
 
 	<target name="N">
diff --git a/releng.wtpbuilder/distribution/wtp.tests/build.xml b/releng.wtpbuilder/distribution/wtp.tests/build.xml
index 90ec5ba..f98e5b7 100644
--- a/releng.wtpbuilder/distribution/wtp.tests/build.xml
+++ b/releng.wtpbuilder/distribution/wtp.tests/build.xml
@@ -60,6 +60,9 @@
 			<jvmarg value="-Dos=${baseos}" />
 			<jvmarg value="-Darch=${basearch}" />
 			<jvmarg value="-Dnoclean=true" />
+			<jvmarg value="-DbuildType=${buildType}" />
+			<jvmarg value="-DbuildId=${buildId}" />
+			<jvmarg value="-DbuildLabel=${buildLabel}" />
 			<arg value="-propertyfile" />
 			<arg value="test.properties" />
 			<arg value="-application" />
diff --git a/releng.wtpbuilder/scripts/build/build.xml b/releng.wtpbuilder/scripts/build/build.xml
index c124064..10f48f2 100644
--- a/releng.wtpbuilder/scripts/build/build.xml
+++ b/releng.wtpbuilder/scripts/build/build.xml
@@ -1,9 +1,111 @@
-<project default="runBuild" >
+<project default="runBuild">
 
 	<target name="runBuild">
 		<dirname file="${ant.file}" property="scripts.build.dir" />
 		<property name="wtp.builder.home" value="${scripts.build.dir}/../.." />
-		
+
+		<antcall target="runEclipseBuild">
+			<param name="wtp.builder.home" value="${wtp.builder.home}" />
+		</antcall>
+		<antcall target="runEclipseBuildStamped">
+			<param name="wtp.builder.home" value="${wtp.builder.home}" />
+		</antcall>
+	</target>
+
+
+
+	<target name="build" depends="init">
+
+		<!--this property required as of Eclipse 3.0 stream builds > 20031126 -->
+		<property name="buildingOSGi" value="true" />
+
+		<!--run the build for the specified component-->
+		<echo message="basedir: ${basedir}" />
+		<echo message="component: ${component}" />
+		<echo message="buildDirectory: ${buildDirectory}" />
+		<echo message="wtp.builder.home: ${wtp.builder.home}" />
+
+		<ant antfile="build.xml" dir="${pde.build.scripts}">
+			<property name="builder" value="${wtp.builder.home}/components/${component}" />
+			<property name="wtp.builder.home" value="${wtp.builder.home}" />
+			<property name="buildBranch" value="${buildBranch}" />
+			<property name="cvsUser" value="${cvsUser}" />
+			<property name="cvsProtocol" value="${cvsProtocol}" />
+			<property name="dependencyTargets" value="${wtp.builder.home}/scripts/dependency/build.xml" />
+			<property name="local.cache.dir" value="${build.home}/${build.local.repository}" />
+			<property name="baseLocation" value="${build.home}/${build.current}-${build.distribution}-${buildType}/${base.location}" />
+			<property name="buildRoot" value="${build.home}/${build.current}-${build.distribution}-${buildType}" />
+			<property name="testRoot" value="${build.home}/${build.tests}-${build.distribution}-${buildType}" />
+			<property name="performanceRoot" value="${build.home}/${build.perf.tests}-${buildType}" />
+			<property name="bootclasspath" value="${java.home}/lib/rt.jar${path.separator}${java.home}/lib/jsse.jar" />
+		</ant>
+	</target>
+
+	<target name="checkBaseBuilder">
+		<available property="basebuilderLocal" file="${build.home}/${eclipse.builder}" />
+	</target>
+
+	<target name="getBaseBuilder" depends="checkBaseBuilder" unless="basebuilderLocal">
+		<!-- ***  change the repo info -->
+		<property name="builderCvsRoot" value=":pserver:anonymous@dev.eclipse.org:/home/eclipse" />
+		<property name="eclipse.builder.version" value="HEAD" />
+		<cvs cvsRoot="${builderCvsRoot}" package="org.eclipse.releng.basebuilder" dest="${build.home}" tag="${eclipse.builder.version}" />
+	</target>
+
+
+	<target name="init">
+
+		<condition property="buildBranch" value="R1.0">
+			<equals arg1="${mapVersionTag}" arg2="HEAD" />
+		</condition>
+		<condition property="buildBranch" value="R0.7 Maintenance">
+			<equals arg1="${mapVersionTag}" arg2="R0_7_maintenance" />
+		</condition>
+
+		<property file="${wtp.builder.home}/build.properties" />
+		<touch file="${user.home}/.cvspass" />
+
+		<ant antfile="${wtp.builder.home}/scripts/build/label.xml" />
+		<property file="${buildDirectory}/label.properties" />
+
+		<!--fetch the HEAD stream of all projects if build type specified as N-->
+		<condition property="fetchTag" value="HEAD">
+			<equals arg1="${buildType}" arg2="N" />
+		</condition>
+
+		<condition property="tagMaps">
+			<equals arg1="${build.trial}" arg2="false" />
+		</condition>
+	</target>
+
+	<target name="runEclipseBuild" if="buildId">
+		<java classpath="${build.home}/${eclipse.builder}/startup.jar" fork="true" classname="org.eclipse.core.launcher.Main" failonerror="true">
+			<jvmarg value="-Dosgi.ws=${basews}" />
+			<jvmarg value="-Dosgi.os=${baseos}" />
+			<jvmarg value="-Dosgi.arch=${basearch}" />
+			<jvmarg value="-Dbasews=${basews}" />
+			<jvmarg value="-Dbaseos=${baseos}" />
+			<jvmarg value="-Dbasearch=${basearch}" />
+			<jvmarg value="-Dbuild.home=${build.home}" />
+			<jvmarg value="-Dbuild.trial=${build.trial}" />
+			<jvmarg value="-DbuildType=${buildType}" />
+			<jvmarg value="-DbuildId=${buildId}" />
+			<jvmarg value="-DjavacDebugInfo=${javacDebugInfo}" />
+			<jvmarg value="-DmapVersionTag=${mapVersionTag}" />
+			<jvmarg value="-DcvsUser=${cvsUser}" />
+			<jvmarg value="-DcvsProtocol=${cvsProtocol}" />
+			<jvmarg value="-Dwtp.builder.home=${wtp.builder.home}" />
+			<jvmarg value="-Dbuild.distribution=${build.distribution}" />
+			<jvmarg value="-Dcomponent=${component}" />
+			<arg value="-application" />
+			<arg value="org.eclipse.ant.core.antRunner" />
+			<arg value="-buildfile" />
+			<arg value="${ant.file}" />
+			<arg value="build" />
+		</java>
+	</target>
+	
+	<target name="runEclipseBuildStamped" unless="buildId">
 		<java classpath="${build.home}/${eclipse.builder}/startup.jar" fork="true" classname="org.eclipse.core.launcher.Main" failonerror="true">
 			<jvmarg value="-Dosgi.ws=${basews}" />
 			<jvmarg value="-Dosgi.os=${baseos}" />
@@ -28,69 +130,4 @@
 			<arg value="build" />
 		</java>
 	</target>
-	
-	
-	<target name="build" depends="init">
-
-		<!--this property required as of Eclipse 3.0 stream builds > 20031126 -->
-		<property name="buildingOSGi" value="true" />
-
-		<!--run the build for the specified component-->
-		<echo message="basedir: ${basedir}" />
-		<echo message="component: ${component}" />
-		<echo message="buildDirectory: ${buildDirectory}" />
-
-		<ant antfile="build.xml" dir="${pde.build.scripts}"  >
-			<property name="builder" value="${wtp.builder.home}/components/${component}" />			
-			<property name="wtp.builder.home" value="${wtp.builder.home}" />			
-			<property name="buildBranch" value="${buildBranch}" />			
-			<property name="cvsUser" value="${cvsUser}" />
-			<property name="cvsProtocol" value="${cvsProtocol}" />
-			<property name="dependencyTargets" value="${wtp.builder.home}/scripts/dependency/build.xml" />
-			<property name="local.cache.dir" value="${build.home}/${build.local.repository}" />
-			<property name="baseLocation" value="${build.home}/${build.current}-${build.distribution}-${buildType}/${base.location}" />
-			<property name="buildRoot" value="${build.home}/${build.current}-${build.distribution}-${buildType}" />
-			<property name="testRoot" value="${build.home}/${build.tests}-${build.distribution}-${buildType}" />
-			<property name="performanceRoot" value="${build.home}/${build.perf.tests}-${buildType}" />
-			<property name="bootclasspath" value="${java.home}/lib/rt.jar${path.separator}${java.home}/lib/jsse.jar" />
-		</ant>
-	</target>	
-
-	<target name="checkBaseBuilder">
-		<available property="basebuilderLocal" file="${build.home}/${eclipse.builder}" />
-	</target>
-
-	<target name="getBaseBuilder" depends="checkBaseBuilder" unless="basebuilderLocal">
-		<!-- ***  change the repo info -->
-		<property name="builderCvsRoot" value=":pserver:anonymous@dev.eclipse.org:/home/eclipse" />
-		<property name="eclipse.builder.version" value="HEAD" />
-		<cvs cvsRoot="${builderCvsRoot}" package="org.eclipse.releng.basebuilder" dest="${build.home}" tag="${eclipse.builder.version}" />
-	</target>
-
-
-	<target name="init" >
-		
-		<condition property="buildBranch" value="R1.0">
-			<equals arg1="${mapVersionTag}" arg2="HEAD" />
-		</condition>
-		<condition property="buildBranch" value="R0.7 Maintenance">
-			<equals arg1="${mapVersionTag}" arg2="R0_7_maintenance" />
-		</condition>
-		
-		<property file="${wtp.builder.home}/build.properties" />
-		<touch file="${user.home}/.cvspass" />
-
-		<ant antfile="${wtp.builder.home}/scripts/build/label.xml" />
-		<property file="${buildDirectory}/label.properties" />
-
-		<!--fetch the HEAD stream of all projects if build type specified as N-->
-		<condition property="fetchTag" value="HEAD">
-			<equals arg1="${buildType}" arg2="N" />
-		</condition>
-
-		<condition property="tagMaps">
-			<equals arg1="${build.trial}" arg2="false" />
-		</condition>
-	</target>
-	
 </project>
\ No newline at end of file