358460 - Dali needs build for 3.1 release
diff --git a/releng.wtpbuilder/distribution/dali.site/build.xml b/releng.wtpbuilder/distribution/dali.site/build.xml
index 26629a4..09456db 100644
--- a/releng.wtpbuilder/distribution/dali.site/build.xml
+++ b/releng.wtpbuilder/distribution/dali.site/build.xml
@@ -2,29 +2,38 @@
     name="Build specific targets and properties"
     default="build"
     basedir=".">
-
-    <!-- Note to be cross-platform, "environment variables" are only appropriate for
-        some variables, e.g. ones we set, since properties are case sensitive, even if
-        the environment variables on your operating system are not, e.g. it will
-        be ${env.Path} not ${env.PATH} on Windows -->
+    <!--
+        Note to be cross-platform, "environment variables" are only
+        appropriate for some variables, e.g. ones we set, since
+        properties are case sensitive, even if the environment variables
+        on your operating system are not, e.g. it will be ${env.Path}
+        not ${env.PATH} on Windows
+    -->
     <property environment="env"/>
-    <!-- 
-        Let users override standard properties, if desired.
-        If directory, file, or some properties do not exist,  
-        then standard properties will be used.
+    <!--
+        Let users override standard properties, if desired. If
+        directory, file, or some properties do not exist, then standard
+        properties will be used.
     -->
     <property file="${env.LOCAL_BUILD_PROPERTIES_DIR}/${ant.project.name}.properties"/>
 
     <!-- = = = end standard properties pattern = = = -->
-
     <echo level="debug" message="ant.file: ${ant.file}"/>
-    <condition
-        property="antQuietValue"
-        value="-quiet"
-        else="">
-        <istrue value="${env.USE_QUIET}"/>
-    </condition>
     <target name="build">
+
+          <!-- make sure there is a base builder, since we need the launcher -->
+        <ant
+            antfile="${wtp.builder.home}/scripts/build/runbuild.xml"
+            target="getBaseBuilder"/>
+        <condition
+            property="antQuietValue"
+            value="-quiet"
+            else="">
+            <istrue value="${env.USE_QUIET}"/>
+        </condition>
+        <!-- TODO: should set 'failonerror' to false, and follow up with error 
+        check and appropriate cleanup/finishup actions before failing -->
+
         <java
             fork="true"
             failonerror="true"
@@ -40,13 +49,17 @@
             <jvmarg value="-Dbuild.donottagmaps=${build.donottagmaps}"/>
             <jvmarg value="-DbuildBranch=${buildBranch}"/>
             <jvmarg value="-DbuildType=${buildType}"/>
+            <jvmarg value="-DdependencyFileLocation=${dependencyFileLocation}"/>
+
             <jvmarg value="-DbuildId=${buildId}"/>
             <jvmarg value="-DmapVersionTag=${mapVersionTag}"/>
             <jvmarg value="-Dbuild.distribution=${build.distribution}"/>
             <jvmarg value="-DbuildDirectory=${buildDirectory}"/>
             <jvmarg value="-Dwtp.builder.home=${wtp.builder.home}"/>
-            <jvmarg value="-Djava.io.tmpdir=${env.RECOMMENDED_TMP_DIR}"/>
             <jvmarg value="-Dprojectname=${projectname}"/>
+            <jvmarg value="-Djava.io.tmpdir=${env.RECOMMENDED_TMP_DIR}"/>
+            <jvmarg value="-Djava.protocol.handler.pkgs=org.eclipse.wtp.releng.www.protocol"/>
+            <jvmarg value="-DurlLogLocation=${buildDirectory}/${buildLabel}/outgoinghttplogfromsitebuild.log"/>
             <arg value="-data"/>
             <arg value="${basedir}/workspace"/>
             <arg value="-application"/>
@@ -57,10 +70,13 @@
             <arg value="publish"/>
         </java>
     </target>
-
-    <!-- ===================================================================== -->
+    <!--
+        =====================================================================
+    -->
     <!-- Steps to do to publish the build results -->
-    <!-- ===================================================================== -->
+    <!--
+        =====================================================================
+    -->
     <target name="publish">
         <dirname
             file="${ant.file}"
@@ -68,10 +84,12 @@
         <ant antfile="${wtp.builder.home}/scripts/build/label.xml"/>
         <property file="${buildDirectory}/label.properties"/>
 
+         <!-- buildLabel is defined in label.properties -->
+        <mkdir dir="${buildDirectory}/${buildLabel}"/>
+
         <property
             name="publish.xml"
             value="${component.dir}/publish.xml"/>
-
         <property
             name="indexFileName"
             value="index.php"/>
@@ -82,26 +100,20 @@
             name="indexTemplateFilename"
             value="index.html.template.php"/>
 
-        <copy
-            file="${wtp.builder.home}/distribution/wtp.site/templateFiles/${indexTemplateFilename}"
-            tofile="${buildDirectory}/${indexFileName}"/>
-
         <condition
             property="isBuildTested"
             value="true">
             <available file="${buildDirectory}/${buildLabel}/testResults/html"/>
         </condition>
-
         <ant
             antfile="${publish.xml}"
             dir="${component.dir}">
             <property
                 name="dropTokenList"
                 value="%wtpruntime%,%wtpsdk%,%wtptest%,%wst%,%wst-sdk%,%wst-tests%,%jst-tests%,%wst-perf-tests%,%jst-perf-tests%,%jpt-runtime%,%jpt-sdk%,%jpt-tests%"/>
-            <property
+             <property
                 name="webtoolsDownloadURL"
                 value="http://www.eclipse.org/downloads/download.php?file=/webtools/committers/drops"/>
-
             <property
                 name="buildBranch"
                 value="${buildBranch}"/>
@@ -115,21 +127,38 @@
 
         <!--  Get the build map over for the results to point to. -->
         <copy
+            failonerror="false"
             file="${buildDirectory}/directory.txt"
             tofile="${result}/directory.txt"/>
 
         <!-- Copy info for build identification -->
         <copy
+            failonerror="false"
             file="${buildDirectory}/label.properties"
             tofile="${result}/label.properties"/>
 
+        <!-- http access logs -->
+        <copy
+            todir="${result}/"
+            failonerror="false">
+            <fileset
+                dir="${buildDirectory}"
+                includes="*.log"/>
+        </copy>
+
+        <!-- ant build log, from control directory -->
+        <copy
+            todir="${result}/"
+            failonerror="false">
+            <fileset
+                dir="${env.ANT_WORKING}/${projectname}"
+                includes="antBuilderOutput.log"/>
+        </copy>
+               
         <!-- final count files -->
         <countBuildFiles
             sourceDirectory="${buildDirectory}/${buildLabel}"
             filterString=".zip,.tar.gz"
             outputFile="${buildDirectory}/${buildLabel}/files.count"/>
-
     </target>
-
-
-</project>
+</project>
\ No newline at end of file
diff --git a/releng.wtpbuilder/distribution/dali.site/compilerXMLOutputToHTML.xsl b/releng.wtpbuilder/distribution/dali.site/compilerXMLOutputToHTML.xsl
index 087b828..19f185c 100644
--- a/releng.wtpbuilder/distribution/dali.site/compilerXMLOutputToHTML.xsl
+++ b/releng.wtpbuilder/distribution/dali.site/compilerXMLOutputToHTML.xsl
@@ -2,11 +2,9 @@
 <xsl:stylesheet
     version="1.0"
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-
     <xsl:output
         method="html"
         indent="yes"/>
-
     <xsl:template match="/">
         <html>
             <body>
@@ -14,7 +12,6 @@
             </body>
         </html>
     </xsl:template>
-
     <xsl:template match="compiler">
         <h2>Compiler Report</h2>
         <p>
@@ -24,16 +21,12 @@
             Version:
             <xsl:value-of select="@version"/>
         </p>
-
         <xsl:apply-templates select="stats"/>
-
         <xsl:apply-templates select="sources"/>
     </xsl:template>
-
     <xsl:template
         name="stats"
         match="stats">
-
         <p>
             Number of source files:
             <xsl:value-of select="count(..//source)"/>
@@ -50,17 +43,12 @@
             )
         </p>
     </xsl:template>
-
-
     <xsl:template
         name="sources"
         match="sources">
-
         <xsl:if test="count(source) > 0">
-
             <dl>
                 <xsl:for-each select="source">
-
                     <xsl:variable
                         name="package"
                         select="normalize-space(@package)">
@@ -87,15 +75,11 @@
                     </xsl:if>
                 </xsl:for-each>
             </dl>
-
         </xsl:if>
-
     </xsl:template>
-
     <xsl:template match="problems">
         <xsl:param name="classname"/>
         <xsl:for-each select="problem">
-
             <dd style="font-weight: normal; color: black">
                 <xsl:value-of select="position()"/>
                 <xsl:text>.  </xsl:text>
@@ -126,7 +110,6 @@
                         name="end"
                         select="substring(@value,(@sourceEnd + 2))">
                     </xsl:variable>
-
                     <p style="margin-left: +.5in; font-size: -2; margin-top: 0;margin-bottom:0;">
                         <xsl:value-of select="substring($classname,2)"/>
                         :
@@ -145,8 +128,5 @@
                 </xsl:for-each>
             </dd>
         </xsl:for-each>
-
-
     </xsl:template>
-
 </xsl:stylesheet>
\ No newline at end of file
diff --git a/releng.wtpbuilder/distribution/dali.site/staticDropFiles/buildNotes.php b/releng.wtpbuilder/distribution/dali.site/staticDropFiles/buildNotes.php
index 5fe7d4c..3abad92 100644
--- a/releng.wtpbuilder/distribution/dali.site/staticDropFiles/buildNotes.php
+++ b/releng.wtpbuilder/distribution/dali.site/staticDropFiles/buildNotes.php
@@ -38,22 +38,10 @@
 	$aDirectory = dir("buildnotes");
 	while ($anEntry = $aDirectory->read()) {
 	    if ($anEntry != "." && $anEntry != "..") {
-	        //print_r($anEntry);
-	        //echo "<br />";
-
-	        $subject = $anEntry;
-	        $pattern = '/^buildnotes_(.*)/i';
-	        preg_match($pattern, $subject, $matches);
-	        $subject = $matches[1];
-	        //print_r($subject);
-	        //echo "<br />";
-	        $pattern = '/^(.*)\.html$/';
-	        preg_match($pattern, $subject, $matches);
-	        //print_r($matches);
-	        //echo "<br />";
-
-	        $component = $matches[1];
-
+	        $nameprefixlen=strlen("buildnotes_");
+	        $baseName = substr($anEntry,$nameprefixlen);
+	        $extpos=strrpos($baseName,".html");
+	        $component=substr($baseName,0,$extpos);
 	        $line = "<td>Component: <a href=\"buildnotes/$anEntry\">$component</a></td>";
 	        echo "<tr>";
 	        echo "$line";
diff --git a/releng.wtpbuilder/distribution/dali.site/staticDropFiles/httplogs.php b/releng.wtpbuilder/distribution/dali.site/staticDropFiles/httplogs.php
new file mode 100644
index 0000000..4845485
--- /dev/null
+++ b/releng.wtpbuilder/distribution/dali.site/staticDropFiles/httplogs.php
@@ -0,0 +1,57 @@
+<html>
+<head>
+
+
+
+<?php
+$parts = explode("/", getcwd());
+$parts2 = explode("-", $parts[count($parts) - 1]);
+$buildName = $parts2[1];
+
+echo "<title>Diagnosic logs for HTTP requests for $buildName </title>";
+?>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<link rel="stylesheet" href="http://dev.eclipse.org/default_style.css"
+       type="text/css">
+<title>Diagnosic logs for HTTP requests while Running JUnit Plug-in Tests</title>
+</head>
+<body>
+
+<h1>Diagnosic logs for HTTP requests while Running JUnit Plug-in Tests</h1>
+       <?php
+       $rootDir = "testResults/httplogstest/";
+       $hasNotes = false;
+       $aDirectory = dir($rootDir);
+       $index = 0;
+       $dirindex = 0;
+       while ($anEntry = $aDirectory->read()) {
+           if ($anEntry != "." && $anEntry != "..") {
+               if (is_file("$rootDir/$anEntry")) {
+                   $entries[$index] = $anEntry;
+                   $index++;
+               }
+           }
+       }
+       $aDirectory->close();
+
+
+       sort($entries);
+
+
+       for ($i = 0; $i < $index; $i++) {
+           $anEntry = $entries[$i];
+           $logsize = filesize("$rootDir/$anEntry");
+
+           echo "<a href=\"$rootDir/$anEntry\">$anEntry</a>  ($logsize bytes) <br />";
+           
+           $hasNotes = true;
+       }
+
+       if (!$hasNotes) {
+           echo "<br>If there are no logs here, that (likely) means the HTTP Trace Diagnostic jar needs to be copied to the test JREs lib/ext directory.";
+       }
+       ?>
+
+       </table>
+</body>
+</html>
diff --git a/releng.wtpbuilder/distribution/dali.site/staticDropFiles/miscUtil.php b/releng.wtpbuilder/distribution/dali.site/staticDropFiles/miscUtil.php
index 6fceb35..540468b 100644
--- a/releng.wtpbuilder/distribution/dali.site/staticDropFiles/miscUtil.php
+++ b/releng.wtpbuilder/distribution/dali.site/staticDropFiles/miscUtil.php
@@ -3,6 +3,9 @@
 // todo: unsure if can handle filenames that are URLs?
 // handy constant to compute file size in megabytes
 
+include_once('buildvariables.php');
+
+
 function fileSizeInMegs($filename) {
     $onemeg=1024*1024;
     $zipfilesize=filesize($filename);
@@ -15,14 +18,19 @@
     $onemeg=$onekilo * $onekilo;
     $criteria = 10 * $onemeg;
     $scaleChar = "M";
-    $zipfilesize=filesize($filename);
-    if ($zipfilesize > $criteria) {
-        $zipfilesize=round($zipfilesize/$onemeg, 0);
-        $scaleChar = "M";
+    if (file_exists($filename)) {
+        $zipfilesize=filesize($filename);
+        if ($zipfilesize > $criteria) {
+            $zipfilesize=round($zipfilesize/$onemeg, 0);
+            $scaleChar = "M";
+        }
+        else {
+            $zipfilesize=round($zipfilesize/$onekilo, 0);
+            $scaleChar = "K";
+        }
     }
     else {
-        $zipfilesize=round($zipfilesize/$onekilo, 0);
-        $scaleChar = "K";
+        $zipfilesize = 0;
     }
     $result =  "(" . $zipfilesize . $scaleChar . ")";
     return $result;
@@ -35,11 +43,82 @@
     echo "</td><td align=\"right\" valign=\"top\" width=\"3%\">";
     echo $zipfilesize;
     echo "</td>";
-    echo "<td align=\"right\" valign=\"top\" width=\"2%\">";
-    echo "[<a href=\"checksum/$filename.md5\">md5</a>]";
+    echo "<td align=\"right\" valign=\"top\" width=\"7%\">";
+    echo "[<a href=\"checksum/$filename.md5\">md5</a>][<a href=\"checksum/$filename.sha1\">sha1</a>]";
     echo "</td>";
 }
 
+/*
+ * This function needs to add the subdir, if on mirrored server, but not add it if not,
+* since assumed the calling page is such that a relative URL (already in subdir) is correct.
+*/
+function displayFileLineSubdir($downloadprefix, $subdir, $filename, $zipfilesize, $fileShortDescription) {
+    echo "<td align=\"right\" valign=\"top\" width=\"30%\">";
+    $fullURL=$downloadprefix.$subdir."/".$filename;
+    if (isMirrored($fullURL)) {
+        echo "<a href=\"" . $fullURL . "\">" . $fileShortDescription . "</a>";
+    }
+    else {
+        echo "<a href=\"" . $filename . "\">" . $fileShortDescription . "</a>";
+    }
+    echo "</td><td align=\"right\" valign=\"top\" width=\"3%\">";
+    echo $zipfilesize;
+    echo "</td>";
+    echo "<td align=\"right\" valign=\"top\" width=\"7%\">";
+    echo "[<a type=\"text/plain\" href=\"checksum/$filename.md5\">md5</a>][<a type=\"text/plain\" href=\"checksum/$filename.sha1\">sha1</a>]";
+    echo "</td>";
+}
+
+function displayFileLineWithSHA($downloadprefix, $filename, $zipfilesize, $fileShortDescription) {
+    echo "<td align=\"right\" valign=\"top\" width=\"15%\">";
+    echo "<a href=\"$downloadprefix$filename\">" . $fileShortDescription . "</a>";
+    echo "</td><td align=\"right\" valign=\"top\" width=\"2%\">";
+    echo $zipfilesize;
+    echo "</td>";
+    echo "<td align=\"right\" valign=\"top\" width=\"7%\">";
+    echo "[<a type=\"text/plain\" href=\"checksum/$filename.md5\">md5</a>][<a type=\"text/plain\" href=\"checksum/$filename.sha1\">sha1</a>]";
+    echo "</td>";
+}
+
+function displayRepoFileLine($downloadprefix, $subdir, $filename, $zipfilesize, $fileShortDescription) {
+    echo "<td align=\"right\" valign=\"top\" width=\"30%\">";
+    echo "<a href=\"" . $downloadprefix . $subdir . "/" . $filename . "\">" . $fileShortDescription . "</a>";
+    echo "</td><td align=\"right\" valign=\"top\" width=\"3%\">";
+    echo $zipfilesize;
+    echo "</td>";
+    echo "<td align=\"right\" valign=\"top\" width=\"7%\">";
+    echo "[<a type=\"text/plain\" href=\"$subdir/checksum/$filename.md5\">md5</a>][<a type=\"text/plain\" href=\"$subdir/checksum/$filename.sha1\">sha1</a>]";
+    echo "</td>";
+}
+
+
+function displayp2repoarchives($zipfilename, $subdir, $downloadprefix, $fileShortDescription, $label, $description) {
+
+    $filename=$zipfilename.".zip";
+    $wholepath="./".$subdir."/".$filename;
+    if (file_exists($wholepath)) {
+        echo "<tr>";
+
+        echo "<td align=\"left\" valign=\"top\" width=\"10%\"><b>".$label."</b></td>";
+        echo "<td align=\"left\" valign=\"top\">";
+        echo "<p>".$description."</p>";
+        echo "</td>";
+
+        $zipfilesize=fileSizeForDisplay($wholepath);
+
+        displayRepoFileLine($downloadprefix, $subdir, $filename, $zipfilesize, $fileShortDescription);
+
+        echo "</tr>";
+    } else {
+
+        // debug only
+        // echo $wholepath."<br/>";
+    }
+
+}
+
+
+
 function resourceExist($url, $mirrorPrefixuri, $prereqfilename, $eclipseFSpathPrefix)
 {
     $result = false;
@@ -197,7 +276,6 @@
     return $platform;
 }
 
-
 function getPrereqReferenceOrName($eclipseMirrorScript, $mirrorPrefixuri, $prerequrl, $prereqfilename, $eclipseFSpathPrefix) {
     // todo: we really only need "if exists" so could make a bit more efficient
     // I tried "file_exists" but is didn't seem to work on my test server
diff --git a/releng.wtpbuilder/distribution/dali.site/templateFiles/buildvariables.php b/releng.wtpbuilder/distribution/dali.site/templateFiles/buildvariables.php
new file mode 100644
index 0000000..cf0de9d
--- /dev/null
+++ b/releng.wtpbuilder/distribution/dali.site/templateFiles/buildvariables.php
@@ -0,0 +1,75 @@
+<?php
+
+// this file is for "variables" that are set/created at
+// build time, which can then be included or used
+// from mulitiple files, by using
+// include('buildvariables.php');
+
+include_once("miscUtil.php");
+
+$incubating="false";
+$displayBuildNotes=false;
+
+$build_distribution="@build_distribution@";
+$buildBranch="@buildBranch@";
+$build="@build@";
+$buildtype="@buildtype@";
+$builddate="@date@";
+
+
+
+$debugScript = false;
+$debugFunctions = false;
+
+$defaultMirrorScript="";
+$defaultWTPMirrorPrefix="./";
+
+$eclipseMirrorScript="http://www.eclipse.org/downloads/download.php?file=";
+
+// TODO: improve so this hard coding isn't required.
+// This depends on the declare script changing webtools/committers to webtools/downloads
+// And, the logic is such that if it is not mirrored, this URI is not used at all, just
+// a relative reference only
+$eclipseWTPMirrorPrefix="/webtools/committers/drops/$buildBranch/$build/";
+
+
+$mirrorScript=$defaultMirrorScript;
+$downloadprefix=$defaultWTPMirrorPrefix;
+
+
+$keytestMirrorString=$eclipseMirrorScript . $eclipseWTPMirrorPrefix."/".$build_distribution."-".$build.".zip";
+if (isMirrored($keytestMirrorString) ) {
+    $mirrorScript=$eclipseMirrorScript;
+    $downloadprefix=$mirrorScript.$eclipseWTPMirrorPrefix;
+}
+
+if ($debugScript)  {
+    echo "inferred platform: " . getPlatform();
+}
+
+
+switch ($buildtype) {
+    case "I":
+        $type="Integration";
+        break;
+    case "M":
+        $type="Maintenance";
+        break;
+    case "R":
+        $type="Release";
+        break;
+    case "S":
+        $type="Stable";
+        break;
+    case "P":
+        $type="Patches";
+        break;
+    case "N":
+        $type="HEAD";
+        break;
+    default:
+        $type=$buildtype;
+}
+
+
+?>
diff --git a/releng.wtpbuilder/distribution/dali.site/templateFiles/components.template.php b/releng.wtpbuilder/distribution/dali.site/templateFiles/components.template.php
new file mode 100644
index 0000000..48fd0f7
--- /dev/null
+++ b/releng.wtpbuilder/distribution/dali.site/templateFiles/components.template.php
@@ -0,0 +1,106 @@
+<html>
+<head>
+
+
+
+
+<?php
+//ini_set("display_errors", "true");
+//error_reporting (E_ALL);
+
+include("../miscUtil.php");
+include("../buildvariables.php");
+
+// todo: could use some index array of general descriptions in future
+$known_component_prefixes = array();
+$known_component_prefixes[]="wtp-jaxws";
+$known_component_prefixes[]="wtp-common-fproj";
+
+
+echo "<title>Components from build </title> \n";
+?>
+
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+
+<style>
+.bold,.bold TD,.bold TH,.bold TR {
+	font-weight: bold;
+}
+</style>
+
+
+</head>
+<body>
+	<p>
+		<b><font face="Verdana" size="+3">Components</font> </b>
+	</p>
+	<p>These are special-purpose subsets of the WTP build. They are not
+		needed for normal use or construction of WTP (if they are needed, they
+		are already included in other zip files or repositories). These are
+		provided here by special request of committers, for custom
+		distribtions or tests.</p>
+	<table border=0 cellspacing=5 cellpadding=2 width="100%">
+		<tr>
+			<td align=LEFT valign=TOP colspan="3" bgcolor="#0080C0"><b><font
+					color="#FFFFFF" face="Arial,Helvetica"> component subsets</font> </b>
+			</td>
+		</tr>
+	</table>
+	
+	
+
+
+
+
+
+<?php
+
+// Assuse this file is in the directory we are interested in
+$dir = dir(getcwd());
+
+//echo "dir: " . $dir->path . "<br /> \n";
+while ($anEntry = $dir->read())
+{
+
+     echo "<table>";
+
+     if ($anEntry != "." && $anEntry != ".." && is_file($anEntry))
+
+     {
+
+          $path_parts = pathinfo($anEntry);
+          $file_extension = $path_parts['extension'];
+
+          if ("zip" === $file_extension) {
+               // echo "       path parts: " . print_r($path_parts) . "<br /> \n";
+
+               echo "<tr>\n";
+
+               echo "<td align=\"left\" valign=\"top\" width=\"10%\"></td>\n";
+               // todo: could use indexed general description here?
+               //echo "    <td align=\"left\" valign=\"top\">\n";
+               //echo "     <p>The Automated Test zip contains the unit tests.</p>\n";
+
+               $zipfilename=$path_parts['basename'];
+
+               $filename=$zipfilename;
+               $zipfilesize=fileSizeForDisplay($filename);
+               $fileShortDescription=$zipfilename;
+               displayFileLineSubdir($downloadprefix, "components", $filename, $zipfilesize, $fileShortDescription);
+
+               echo "</tr>\n";
+
+
+
+          }
+
+
+     }
+     echo "</table>";
+}
+
+?>
+
+
+</body>
+</html>
diff --git a/releng.wtpbuilder/distribution/dali.site/templateFiles/displayPrereqs.php b/releng.wtpbuilder/distribution/dali.site/templateFiles/displayPrereqs.php
new file mode 100644
index 0000000..e326290
--- /dev/null
+++ b/releng.wtpbuilder/distribution/dali.site/templateFiles/displayPrereqs.php
@@ -0,0 +1,328 @@
+<!-- ***********  Required Prerequisites **************  -->
+<table border=0 cellspacing=2 cellpadding=2 width="100%">
+	<tr>
+		<td align="left" valign="top" bgcolor="#0080C0"><font
+			face="'Bitstream Vera',Helvetica,Arial" color="#FFFFFF">Prerequisites
+				and Handy Extras</font></td>
+	</tr>
+	<tr>
+		<td>
+			<p>These are the prerequisites to build or run these packages. All
+				are not necessarily required, but instead some subset. Also listed
+				are some frequently needed links for committer-required packages
+				when creating new development environments, or targets to run
+				against.</p>
+			<p>
+				Note that WTP as a whole requires Java 6 even though subsets of WTP
+				and other <a href="http://www.eclipse.org/downloads/">Eclipse
+					Projects</a> might run with <a
+					href="http://www.eclipse.org/downloads/moreinfo/jre.php">other JRE
+					levels</a>.
+			</p>
+			<p></p>
+		</td>
+	</tr>
+	<tr>
+		<td>
+			<table border=0 cellspacing=1 cellpadding=1 width="90%"
+				align="center">
+
+				<tr valign="middle">
+					<td colspan="2"><hr /></td>
+				</tr>
+				
+				
+				
+				
+
+                    <?php
+                    include_once('dependency.properties.php');                                        
+                    include_once('prereqsToDisplay.php');
+                    $eclipse_mirror_script="http://www.eclipse.org/downloads/download.php?file=";
+                    
+                    if ("true" === $prereq_eclipseplatform) {
+                        
+                        echo "<td width=\"50%\">";
+                        echo $eclipseplatform_name . "&nbsp;" . $eclipseplatform_description ;
+                        echo "</td>";
+
+                        //customize page depending on user's browser/platform, if we can detect it
+                        $usersPlatform = getPlatform();
+                        // assume windows by default, since likely most frequent, even for cases where
+                        // platform is "unknown". I've noticed Opera reports 'unknown' :(
+                        $recommendedFile=$eclipse_file_win32_win32_x86;
+                        if (strcmp($usersPlatform,"linux")== 0) {
+                            $recommendedFile=$eclipse_file_linux_gtk_x86;
+                        } else if (strcmp($usersPlatform,"mac") == 0) {
+                            $recommendedFile=$eclipse_file_macosx_carbon_ppc;
+                        }
+
+                        echo "<td align=\"right\">";
+
+                        echo getPrereqReferenceOrName($eclipse_mirror_script, $eclipseplatform_mirror_prefixuri, $eclipseplatform_url, $recommendedFile, $eclipse_fspath_prefix);
+                        echo " or <a href=\"" . $eclipseplatform_url . "\">appropriate platform</a>";
+                        echo " or <a href=\"" . $eclipseplatform_build_home . "\">equivalent</a></td>";
+
+
+                        echo " </tr>";
+                    }
+                    ?>
+
+                    <?php
+                    if ("true" === $prereq_eclipse) {
+                        
+                        echo "<td width=\"50%\">";
+                        echo $eclipse_name . "&nbsp;" . $eclipse_description ;
+                        echo "</td>";
+
+                        //customize page depending on user's browser/platform, if we can detect it
+                        $usersPlatform = getPlatform();
+                        // assume windows by default, since likely most frequent, even for cases where
+                        // platform is "unknown". I've noticed Opera reports 'unknown' :(
+                        $recommendedFile=$eclipse_file_win32_win32_x86;
+                        if (strcmp($usersPlatform,"linux")== 0) {
+                            $recommendedFile=$eclipse_file_linux_gtk_x86;
+                        } else if (strcmp($usersPlatform,"mac") == 0) {
+                            $recommendedFile=$eclipse_file_macosx_carbon_ppc;
+                        }
+
+                        echo "<td align=\"right\">";
+
+                        echo getPrereqReferenceOrName($eclipse_mirror_script, $eclipse_mirror_prefixuri, $eclipse_url, $recommendedFile, $eclipse_fspath_prefix);
+                        echo " or <a href=\"" . $eclipse_url . "\">appropriate platform</a>";
+                        echo " or <a href=\"" . $eclipse_build_home . "\">equivalent</a></td>";
+
+                        echo " </tr>";
+                    }
+                    ?>
+
+                    <?php
+                    if ("true" === $prereq_emfandxsd) {
+                        
+                        echo "<td width=\"50%\">";
+                        echo $emfandxsd_name . "&nbsp;" . $emfandxsd_description ;
+                        echo "</td>";
+
+                        echo "<td align=\"right\">";
+
+                        echo getPrereqReferenceOrName($eclipse_mirror_script, $emfandxsd_mirror_prefixuri, $emfandxsd_url, $emfandxsd_file, $eclipse_fspath_prefix);
+                        echo " or <a href=\"" . $emfandxsd_build_home . "\">equivalent</a></td>";
+                        echo " </tr>";
+                    }
+                    ?>
+
+                    <?php
+                    if ("true" === $prereq_gef) {
+                        
+                        echo "<td width=\"50%\">";
+                        echo $gef_name  . "&nbsp;" . $gef_description;
+                        echo "</td>";
+
+                        echo "<td align=\"right\">";
+
+                        echo getPrereqReferenceOrName($eclipse_mirror_script, $gef_mirror_prefixuri, $gef_url, $gef_file, $eclipse_fspath_prefix);
+                        echo " or <a href=\"" . $gef_build_home . "\">equivalent</a></td>";
+
+                        echo " </tr>";
+                    }
+                    ?>
+
+                    <?php
+                    if ("true" === $prereq_dtp) {
+                        
+                        echo "<td width=\"50%\">";
+                        echo $dtp_name . "&nbsp;" . $dtp_description;
+                        echo "</td>";
+
+                        echo "<td align=\"right\">";
+
+                        echo getPrereqReferenceOrName($eclipse_mirror_script, $dtp_mirror_prefixuri, $dtp_url, $dtp_file, $eclipse_fspath_prefix);
+                        echo " or <a href=\"" . $dtp_build_home . "\">equivalent</a></td>";
+
+                        echo " </tr>";
+                    }
+                    ?>
+                    
+                    <?php
+                    if ("true" === $prereq_emftransaction) {
+                        
+                        echo "<td width=\"50%\">";
+                        echo $emftransaction_name  . "&nbsp;" . $emftransaction_description;
+                        echo "</td>";
+
+                        echo "<td align=\"right\">";
+
+                        echo getPrereqReferenceOrName($eclipse_mirror_script, $emftransaction_mirror_prefixuri, $emftransaction_url, $emftransaction_file, $eclipse_fspath_prefix);
+                        echo " or <a href=\"" . $emftransaction_build_home . "\">equivalent</a></td>";
+
+                        echo " </tr>";
+                    }
+                    ?>
+
+                    <?php
+                    if ("true" === $prereq_emfvalidation) {
+                        
+                        echo "<td width=\"50%\">";
+                        echo $emfvalidation_name  . "&nbsp;" . $emfvalidation_description;
+                        echo "</td>";
+
+                        echo "<td align=\"right\">";
+
+                        echo getPrereqReferenceOrName($eclipse_mirror_script, $emfvalidation_mirror_prefixuri, $emfvalidation_url, $emfvalidation_file, $eclipse_fspath_prefix);
+                        echo " or <a href=\"" . $emfvalidation_build_home . "\">equivalent</a></td>";
+
+                        echo " </tr>";
+                    }
+                    ?>
+
+                    <?php
+                    if ("true" === $prereq_graphiti) {
+                        
+                        echo "<td width=\"50%\">";
+                        echo $graphiti_name  . "&nbsp;" . $graphiti_description;
+                        echo "</td>";
+
+                        echo "<td align=\"right\">";
+
+                        echo getPrereqReferenceOrName($eclipse_mirror_script, $graphiti_mirror_prefixuri, $graphiti_url, $graphiti_file, $eclipse_fspath_prefix);
+                        echo " or <a href=\"" . $graphiti_build_home . "\">equivalent</a></td>";
+
+                        echo " </tr>";
+                    }
+                    ?>
+
+                    <?php
+                    if ("true" === $prereq_wst) {
+                        
+                        echo "<td width=\"50%\">";
+                        echo $wst_name . "&nbsp;" . $wst_description;
+                        echo "</td>";
+
+                        echo "<td align=\"right\">";
+
+                        echo getPrereqReferenceOrName($eclipse_mirror_script, $wst_mirror_prefixuri, $wst_url, $wst_file, $eclipse_fspath_prefix);
+                        echo " or <a href=\"" . $wst_build_home . "\">equivalent</a></td>";
+
+                        echo " </tr>";
+                    }
+                    ?>
+
+                    <?php
+                    if ("true" === $prereq_jst) {
+                        
+                        echo "<td width=\"50%\">";
+                        echo $jst_name . "&nbsp;" . $jst_description;
+                        echo "</td>";
+
+                        echo "<td align=\"right\">";
+
+                        echo getPrereqReferenceOrName($eclipse_mirror_script, $jst_mirror_prefixuri, $jst_url, $jst_file, $eclipse_fspath_prefix);
+                        echo " or <a href=\"" . $jst_build_home . "\">equivalent</a></td>";
+
+                        echo " </tr>";
+                    }
+                    ?>
+
+                    <?php
+                    if ("true" === $prereq_wtp) {
+                        
+                        echo "<td width=\"50%\">";
+                        echo $wtp_name . "&nbsp;" . $wtp_description;
+                        echo "</td>";
+
+                        echo "<td align=\"right\">";
+
+                        echo getPrereqReferenceOrName($eclipse_mirror_script, $wtp_mirror_prefixuri, $wtp_url, $wtp_file, $eclipse_fspath_prefix);
+                        echo " or <a href=\"" . $wtp_build_home . "\">equivalent</a></td>";
+
+                        echo " </tr>";
+                    }
+                    ?>
+
+                    <?php
+                    if ("true" === $prereq_wtptests) {
+                        
+                        echo "<td width=\"50%\">";
+                        echo $wtptests_name . "&nbsp;" . $wtptests_description;
+                        echo "</td>";
+
+                        echo "<td align=\"right\">";
+
+                        echo getPrereqReferenceOrName($eclipse_mirror_script, $wtptests_mirror_prefixuri, $wtptests_url, $wtptests_file, $eclipse_fspath_prefix);
+                        echo " or <a href=\"" . $wtptests_build_home . "\">equivalent</a></td>";
+
+                        echo " </tr>";
+                    }
+                    ?>
+
+                    <?php
+                    if ("true" === $prereq_dltk) {
+                        
+                        echo "<td width=\"50%\">";
+                        echo $dltk_name . "&nbsp;" . $dltk_description;
+                        echo "</td>";
+
+                        echo "<td align=\"right\">";
+
+                        echo getPrereqReferenceOrName($eclipse_mirror_script, $dltk_mirror_prefixuri, $dltk_url, $dltk_file, $eclipse_fspath_prefix);
+                        echo " or <a href=\"" . $dltk_build_home . "\">equivalent</a></td>";
+
+                        echo " </tr>";
+                    }
+                    ?>
+                    
+                    <tr valign="middle">
+                         <td colspan="2"><hr /></td>
+                    </tr>
+
+                     <?php
+                     if ("true" === $prereq_eclipsetestframework) {
+                            
+                         echo "<td width=\"50%\">";
+                         echo $eclipseTestFramework_name . "&nbsp;" . $eclipseTestFramework_description;
+                         echo "</td>";
+ 
+                            echo "<td align=\"right\">";
+
+                            echo getPrereqReferenceOrName($eclipse_mirror_script, $eclipseTestFramework_mirror_prefixuri, $eclipseTestFramework_url, $eclipseTestFramework_file, $eclipse_fspath_prefix);
+                            echo " or <a href=\"" . $eclipseTestFramework_build_home . "\">equivalent</a></td>";
+                            echo "</tr>";
+                     }
+                     ?>
+
+                     <?php
+                     if ("true" === $prereq_eclipsereleng) {
+                            
+                        echo "<td width=\"50%\">";
+                        echo $eclipsereleng_name . "&nbsp;" . $eclipsereleng_description;
+                        echo "</td>";
+
+                            echo "<td align=\"right\">";
+
+                            echo getPrereqReferenceOrName($eclipse_mirror_script, $eclipsereleng_mirror_prefixuri, $eclipsereleng_url, $eclipsereleng_file, $eclipse_fspath_prefix);
+                            echo " or <a href=\"" . $eclipsereleng_build_home . "\">equivalent</a></td>";
+                            echo "</tr>";
+                     }
+                     ?>
+
+                     <?php
+                     if ("true" === $prereq_orbitthirdpartyzip) {
+                            
+                         echo "<td width=\"50%\">";
+                        echo $orbitthirdpartyzip_name . "&nbsp;" . $orbitthirdpartyzip_description;
+                        echo "</td>";
+
+                            echo "<td align=\"right\">";
+
+                            echo getPrereqReferenceOrName($eclipse_mirror_script, $orbitthirdpartyzip_mirror_prefixuri, $orbitthirdpartyzip_url, $orbitthirdpartyzip_file, $eclipse_fspath_prefix);
+                            echo " or <a href=\"" . $orbitthirdpartyzip_build_home . "\">equivalent</a></td>";
+                            echo "</tr>";
+                     }
+                     ?>
+                    
+
+              </table>
+		</td>
+	</tr>
+</table>
+
diff --git a/releng.wtpbuilder/distribution/dali.site/templateFiles/headingIntro.php b/releng.wtpbuilder/distribution/dali.site/templateFiles/headingIntro.php
new file mode 100644
index 0000000..8299b25
--- /dev/null
+++ b/releng.wtpbuilder/distribution/dali.site/templateFiles/headingIntro.php
@@ -0,0 +1,87 @@
+
+<?php
+
+if (isset($incubating) && ($incubating == "true")) {
+    echo '<title>WTP Incubator Downloads</title>';
+}
+else {
+    echo '<title>WTP Downloads</title>';
+}
+
+?>
+
+
+</head>
+
+<body>
+
+
+
+
+
+
+
+
+
+<?php if (isset($incubating) && ($incubating == "true")) {
+    echo "<table BORDER=0 CELLSPACING=2 CELLPADDING=2 WIDTH=\"100%\">";
+    echo " <tr>";
+    echo "        <td ALIGN=left><font face=\"'Bitstream Vera',Helvetica,Arial\" size=\"+2\"><b><?php echo \"$type\";?>";
+    echo "        Build: $build</b></font></td>";
+    echo "        <td align=\"right\" rowspan=\"3\"><a";
+    echo "               href=\"http://www.eclipse.org/projects/what-is-incubation.php\"><img";
+    echo "               src=\"http://www.eclipse.org/images/egg-incubation.png\"";
+    echo "               alt=\"Incubation\" align=\"middle\" border=\"0\"></a></td>";
+
+
+    echo " <tr valign=\"top\">";
+    echo "        <td><font size=\"-1\">" . $builddate . "</font></td>";
+    echo " </tr>";
+    echo " <tr valign=\"top\">";
+    echo "        <td>";
+    echo "        <p>The Eclipse Web Tools Platform (WTP) Incubator Project provides";
+    echo "        tools for development that are just getting started, or are";
+    echo "        experimental in some fashion.</p>";
+    echo "        </td>";
+    echo " </tr>";
+    echo "</table>";
+
+} else {
+
+    echo "<table BORDER=0 CELLSPACING=2 CELLPADDING=2 WIDTH=\"100%\">";
+    echo " <tr>";
+    echo "        <td ALIGN=left><font face=\"'Bitstream Vera',Helvetica,Arial\" size=\"+2\"><b>$type";
+    echo "        Build: " . $build . "</b></font></td>";
+
+    echo " <tr valign=\"top\">";
+    echo "        <td><font size=\"-1\">" . $builddate . "</font></td>";
+    echo " </tr>";
+    echo " <tr valign=\"top\">";
+    echo "        <td>";
+    echo "        <p>The Eclipse Web Tools Platform Project provides tools for Web";
+    echo "               Development, and is a platform for adopters making add-on tools for";
+    echo "               Web Development.</p>";
+    echo "        </td>";
+    echo " </tr>";
+    echo "</table>";
+
+} ?>
+
+
+	<table border=0 cellspacing=2 cellpadding=2 width="100%">
+		<tr>
+			<td align="left" valign="top" bgcolor="#0080C0"><font
+				face="'Bitstream Vera',Helvetica,Arial" color="#FFFFFF">All-in-one
+					Packages</font></td>
+		</tr>
+		<tr>
+			<td>
+				<p>
+					For most uses, we recommend web-developers download the
+					"all-in-one" package, <a href="http://www.eclipse.org/downloads/">Eclipse
+						IDE for Java EE Developers</a>, from the main Eclipse download
+					site.
+				</p>
+			</td>
+		</tr>
+	</table>
\ No newline at end of file
diff --git a/releng.wtpbuilder/distribution/dali.site/templateFiles/index.html.template.php b/releng.wtpbuilder/distribution/dali.site/templateFiles/index.html.template.php
index 38cf688..a81d678 100644
--- a/releng.wtpbuilder/distribution/dali.site/templateFiles/index.html.template.php
+++ b/releng.wtpbuilder/distribution/dali.site/templateFiles/index.html.template.php
@@ -2,9 +2,6 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
 
-<title>Dali Downloads</title>
-
-
 
 
 
@@ -13,104 +10,12 @@
 
 <?php
 
-$buildBranch="@buildBranch@";
-$build="@build@";
-$buildtype="@buildtype@";
-$builddate="@date@";
+//ini_set("display_errors", "true");
+//error_reporting (E_ALL);
 
-$eclipseMirrorPrefixuri="@eclipse.mirror.prefixuri@";
-$eclipseFSpathPrefix="@eclipse.fspath.prefix@";
-
-$eclipsefilelinux="@eclipsefilelinux@";
-$eclipsefilewindows="@eclipsefilewindows@";
-$eclipsefilemacosx="@eclipsefilemacos@";
-
-$eclipseURL="@eclipseURL@";
-$eclipseFile="@eclipseFile@";
-$eclipseBuildURL="@eclipseBuildURL@";
-$eclipseBuildHome="@eclipseBuildHome@";
-$testURL="@testURL@";
-$testFile="@testFile@";
-
-$wstURL="@wstURL@";
-$wstFile="@wstFile@";
-$wstMirrorPrefixuri="@wst.mirror.prefixuri@";
-$wstBuildHome="@wstBuildHome@";
-
-$jstURL="@jstURL@";
-$jstFile="@jstFile@";
-$jstMirrorPrefixuri="@jst.mirror.prefixuri@";
-$jstBuildHome="@jstBuildHome@";
-
-
-$gefURL="@gefURL@";
-$gefFile="@gefFile@";
-$gefMirrorPrefixuri="@gef.mirror.prefixuri@";
-$gefBuildHome="@gefBuildHome@";
-
-$emfURL="@emfURL@";
-$emfFile="@emfFile@";
-$emfMirrorPrefixuri="@emf.mirror.prefixuri@";
-$emfBuildHome="@emfBuildHome@";
-
-$emfxsdURL="@emfxsdURL@";
-$emfxsdFile="@emfxsdFile@";
-$emfxsdMirrorPrefixuri="@emfxsd.mirror.prefixuri@";
-$emfxsdBuildHome="@emfxsdBuildHome@";
-
-$dtpURL="@dtpURL@";
-$dtpFile="@dtpFile@";
-$dtpMirrorPrefixuri="@dtp.mirror.prefixuri@";
-$dtpBuildHome="@dtpBuildHome@";
-
-
-$eclipserelengFile="@eclipserelengFile@";
-$eclipserelengURL="@eclipserelengURL@";
-$orbitthirdpartyzipFile="@orbitthirdpartyzipFile@";
-$orbitthirdpartyzipURL="@orbitthirdpartyzipURL@";
-$orbitthirdpartyzipBuildHome="@orbitthirdpartyzipBuildHome@";
-$orbitthirdpartyzipMirrorPrefixuri="@orbitthirdpartyzip.mirror.prefixuri@";
-
-
-
-
-include("miscUtil.php");
-
-
-
-ini_set("display_errors", "true");
-error_reporting (E_ALL);
-
-
-$debugScript = false;
-$debugFunctions = false;
-
-$defaultMirrorScript="";
-$defaultWTPMirrorPrefix="./";
-
-$eclipseMirrorScript="http://www.eclipse.org/downloads/download.php?file=";
-
-// TODO: improve so this hard coding isn't required.
-// This depends on the declare script changing webtools/committers to webtools/downloads
-// And, the logic is such that if it is not mirrored, this URI is not used at all, just
-// a relative reference only
-$eclipseWTPMirrorPrefix="/webtools/committers/drops/$buildBranch/$build/";
-
-
-$mirrorScript=$defaultMirrorScript;
-$downloadprefix=$defaultWTPMirrorPrefix;
-
-
-$keytestMirrorString=$eclipseMirrorScript . "$eclipseWTPMirrorPrefix/dali-sdk-$build.zip";
-if (isMirrored($keytestMirrorString) ) {
-     $mirrorScript=$eclipseMirrorScript;
-     $downloadprefix="${mirrorScript}${eclipseWTPMirrorPrefix}";
-}
-
-if ($debugScript)  {
-     echo "inferred platform: " . getPlatform();
-}
-
+include_once("miscUtil.php");
+include_once('buildvariables.php');
+include_once('dependency.properties.php');
 
 // our summary results handling requires php 5 (for simple xml file loading)
 // so, if not php 5, just don't display any summary results
@@ -119,6 +24,19 @@
 $displayTestSummary=false;
 if (phpversion() >= 5) {
 
+     $code_totalBundles=0;
+     $code_totalErrors=0;
+     $code_totalWarnings=0;
+     $code_totalforbiddenAccessWarningCount=0;
+     $code_totaldiscouragedAccessWarningCount=0;
+
+     $test_totalBundles=0;
+     $test_totalErrors=0;
+     $test_totalWarnings=0;
+     $test_totalforbiddenAccessWarningCount=0;
+     $test_totaldiscouragedAccessWarningCount=0;
+
+
      $displayTestSummary=true;
      // expecting grandTotalErrors and grandTotalTests
      $filename = "unitTestsSummary.xml";
@@ -135,335 +53,234 @@
      }
 
      $filename = "compilelogsSummary.xml";
-     $prefix = "code_";
-     $compileSummary = simplexml_load_file($filename);
-     foreach ($compileSummary->summaryItem as $summaryItem) {
-          $name = $summaryItem->name;
-          $value = $summaryItem->value;
-          $code= "\$" . $prefix . $name . " = " . $value . ";";
-          //echo "<br />code: " . $code;
-          eval($code);
+     if (file_exists($filename)) {
+          $prefix = "code_";
+          $compileSummary = simplexml_load_file($filename);
+          foreach ($compileSummary->summaryItem as $summaryItem) {
+               $name = $summaryItem->name;
+               $value = $summaryItem->value;
+               $code= "\$" . $prefix . $name . " = " . $value . ";";
+               //echo "<br />code: " . $code;
+               eval($code);
+          }
      }
 
      $filename = "testcompilelogsSummary.xml";
-     $prefix = "test_";
-     $compileSummary = simplexml_load_file($filename);
-     foreach ($compileSummary->summaryItem as $summaryItem) {
-          $name = $summaryItem->name;
-          $value = $summaryItem->value;
-          $code= "\$" . $prefix . $name . " = " . $value . ";";
-          //echo "<br />code: " . $code;
-          eval($code);
+     if (file_exists($filename)) {
+          $prefix = "test_";
+          $compileSummary = simplexml_load_file($filename);
+          foreach ($compileSummary->summaryItem as $summaryItem) {
+               $name = $summaryItem->name;
+               $value = $summaryItem->value;
+               $code= "\$" . $prefix . $name . " = " . $value . ";";
+               //echo "<br />code: " . $code;
+               eval($code);
+          }
      }
 }
 
 
 ?>
 
-
-</head>
-
-<body>
+<?php include 'headingIntro.php';?>
 
 
-	<table BORDER=0 CELLSPACING=2 CELLPADDING=2 WIDTH="100%">
-		<tr>
-			<td ALIGN=left><font face="'Bitstream Vera',Helvetica,Arial"
-				size="+2"><b><?php echo "$type";?> Build: <?php echo "$build";?> </b>
-			</font>
-			</td>
+<?php include 'displayPrereqs.php';?>
 
-		</tr>
-		<tr valign="top">
-			<td><font size="-1"><?php echo "$builddate";?> </font>
-			</td>
-		</tr>
-		<tr valign="top">
-			<td>
-				<p>These are some special, standalone build for Dali.</p></td>
-		</tr>
-	</table>
-
-	<!-- ***********  Required Prerequisites **************  -->
-	<table border=0 cellspacing=2 cellpadding=2 width="100%">
-		<tr>
-			<td align="left" valign="top" bgcolor="#0080C0"><font
-				face="'Bitstream Vera',Helvetica,Arial" color="#FFFFFF">Required
-					Prerequisites and Handy Extras</font>
-			</td>
-		</tr>
-		<tr>
-			<td>
-				<p>These are the prerequisites to install and run the Web Tools
-					Platform. Also listed are some frequently needed links for
-					committer-required packages when creating new development
-					environments, or targets to run against.</p>
-				<p>
-					Note that WTP requires Java 5 or higher (and, for some things,
-					actually requires a JDK rather than only a JRE) even though many
-					other <a href="http://www.eclipse.org/downloads/">Eclipse Projects</a>
-					can run with <a
-						href="http://www.eclipse.org/downloads/moreinfo/jre.php">other JRE
-						levels</a>.
-				</p>
-				<p></p></td>
-		</tr>
-		<tr>
-			<td>
-				<table border=0 cellspacing=1 cellpadding=1 width="90%"
-					align="center">
-					<tr valign="top">
-						<td width="10%"></td>
-						<td width="40%">Eclipse Platform (Platform, JDT)</td>
-						
-						
+<!-- ***********  P2 Zips **************  -->
 
 
 
+<table border=0 cellspacing=2 cellpadding=2 width="100%">
+     <tr>
+          <td align=left valign=top colspan="2" bgcolor="#0080C0"><font
+               face="'Bitstream Vera',Helvetica,Arial" color="#FFFFFF">P2
+          repositories in zipped format files.</font></td>
+     </tr>
 
+     <tr>
+          <td align="left" valign="top" colspan="5">
+          <p>These are archive versions of P2 repositories that can be
+          downloaded and installed into a development environment or PDE target.
+          Its is recommended to install, rather than to to unzip the traditional
+          packages, since it is more informative of missing prerequites or
+          conflicting dependencies.</p>
+          </td>
+     </tr>
+
+     <tr>
+          <td>
+          <table border=0 cellspacing=2 cellpadding=2 width="90%" align="center">
+
+          <?php
+
+          $shortname=$build_distribution."-repo";
+
+          $zipfilename=$shortname."-".$build;
+          $filename=$zipfilename.".zip";
+          if (file_exists($filename)) {
+               ?>
+               <tr>
+                    <td align="left" valign="top" width="10%"><b>Code Repository</b></td>
+                    <td align="left" valign="top">
+                    <p>Archived p2 repository of WTP code. Good for product builders. </p>
+                    </td>
                     <?php
-                    //customize page depending on user's browser/platform, if we can detect it
-                    $usersPlatform = getPlatform();
-                    // assume windows by default, since likely most frequent, even for cases where
-                    // platform is "unknown". I've noticed Opera reports 'unknown' :(
-                    $recommendedFile=$eclipsefilewindows;
-                    if (strcmp($usersPlatform,"linux")== 0) {
-                         $recommendedFile=$eclipsefilelinux;
-                    } else if (strcmp($usersPlatform,"mac") == 0) {
-                         $recommendedFile=$eclipsefilemacosx;
+                    $zipfilesize=fileSizeForDisplay($filename);
+
+                    displayFileLine($downloadprefix, $filename, $zipfilesize, $shortname);
+                    ?>
+               </tr>
+               <?php } ?>
+              <?php
+
+              $shortname="$build_distribution-tests-repo";
+
+              $zipfilename=$shortname."-".$build;
+              $filename=$zipfilename.".zip";
+              if (file_exists($filename)) {
+                     ?>
+                     <tr>
+                            <td align="left" valign="top" width="10%"><b>Tests Repository</b></td>
+                            <td align="left" valign="top">
+                            <p>Archived p2 repository of WTP code (as above) but also contains unit tests. All-in-one repo, ideal for committers.</p>
+                            </td>
+                            <?php
+                            $zipfilesize=fileSizeForDisplay($filename);
+
+                            displayFileLine($downloadprefix, $filename, $zipfilesize, $shortname);
+                            ?>
+                     </tr>
+                     <?php } ?>
+          </table>
+
+     </tr>
+</table>
+
+
+<!-- ***********  Traditional Zips **************  -->
+<table border=0 cellspacing=2 cellpadding=2 width="100%">
+     <tr>
+          <td align=left valign=top colspan="5" bgcolor="#0080C0"><font
+               face="'Bitstream Vera',Helvetica,Arial" color="#FFFFFF"> Traditional
+          Zip Files</font></td>
+     </tr>
+
+     <tr>
+          <td align="left" valign="top" colspan="5"><?php
+          $zipbellwether_name="$build_distribution-$build.zip";
+          if (file_exists($zipbellwether_name)) {
+               // if-then-include section
+               // include this whole section if (and only if) the bellwether file exists.
+               // For example, may not have been created yet
+               ?>
+
+          <p>The Zip files includes the features and plugins for this build.</p>
+          <p>Note: These traditional zip files should be considered deprecated,
+          in favor of installing the archived P2 repositories. The tradtional
+          zip files may eventually no longer be provided.</p>
+          <?php } else { ?>
+          <p>The traditonal zip files have not been produced yet (or, perhaps,
+          the build failed or was cancelled). Check back in few minutes.</p>
+          <?php } ?></td>
+     </tr>
+     <tr>
+          <td>
+          <table border=0 cellspacing=2 cellpadding=2 width="90%" align="center">
+
+          <?php
+          $zipfilename="$build_distribution-$build";
+          $filename=$zipfilename.".zip";
+          if (file_exists($filename)) {
+               ?>
+               <tr>
+                    <td align="left" valign="top" width="10%"><b>Web App Developers:</b></td>
+                    <td align="left" valign="top" width="55%">
+                    <p>This non-SDK package is for most users. It includes the runnable
+                    code and end-user documentation for those using the tools to develop
+                    web applications.</p>
+                    </td>
+                    <?php
+                    $zipfilesize=fileSizeForDisplay($filename);
+                    $fileShortDescription=$build_distribution;
+                    displayFileLine($downloadprefix, $filename, $zipfilesize, $fileShortDescription);
+                    ?>
+               </tr>
+               <?php } ?>
+
+               <?php
+               $zipfilename=$build_distribution."-sdk-".$build;
+               $filename=$zipfilename.".zip";
+               if (file_exists($filename)) {
+                    ?>
+               <tr>
+                    <td align="left" valign="top" width="10%"><b>Tool Developers:</b></td>
+                    <td align="left" valign="top">
+                    <p>The SDK package includes source code and developer documentation
+                    for those using WTP as a platform to build more tools, as well as
+                    everything that is in the non-SDK version.</p>
+                    </td>
+                    <?php
+                    $zipfilesize=fileSizeForDisplay($filename);
+                    $fileShortDescription=$build_distribution . "-sdk";
+                    displayFileLine($downloadprefix, $filename, $zipfilesize, $fileShortDescription);
+                    ?>
+               </tr>
+               <?php } ?>
+
+               <?php
+               $zipfilename=$build_distribution."-tests-".$build;
+               $filename=$zipfilename.".zip";
+               if (file_exists($filename)) {
+                    ?>
+               <tr>
+                    <td align="left" valign="top" width="10%"><b>Unit Tests</b></td>
+                    <td align="left" valign="top">
+                    <p>The automated test zip contains unit tests.</p>
+                    </td>
+                    <?php
+                    $zipfilesize=fileSizeForDisplay($filename);
+                    $fileShortDescription=$build_distribution . "-tests";
+                    displayFileLine($downloadprefix, $filename, $zipfilesize, $fileShortDescription);
+                    ?>
+
+               </tr>
+               <?php } ?>
+          </table>
+          </td>
+
+
+     </tr>
+
+</table>
+
+
+
+
+<!-- ***********  Build Status **************  -->
+<table border=0 cellspacing=2 cellpadding=2 width="100%">
+     <tr>
+          <td align=left valign=top bgcolor="#0080C0"><font
+               face="'Bitstream Vera',Helvetica,Arial" color="#FFFFFF">Status, tests
+          and other interesting details</font></td>
+     </tr>
+     <tr>
+          <td>
+          <table border=0 cellspacing=2 cellpadding=2 width="90%" align="center">
+
+               <tr>
+                    <td><?php 
+                    if (isset($displayBuildNotes) && $displayBuildNotes) {
+                         echo "<a href=\"buildNotes.php\">Build notes</a> <br />";
                     }
-                    ?>
-                    <td align="right"><?php
-                    echo getPrereqReferenceOrName($eclipseMirrorScript, $eclipseMirrorPrefixuri, $eclipseURL, $recommendedFile, $eclipseFSpathPrefix);
-                    echo " or <a href=\"" . $eclipseBuildURL . "\">appropriate platform</a>";
-                    echo " or <a href=\"" . $eclipseBuildHome . "\">equivalent</a></td>";
-                    ?>
-
-               </tr>
-
-					<tr valign="top">
-						<td width="10%"></td>
-						<td>Web Standard Tools (WST)</td>
-						<td align="right"><?php
-						// debug
-						// echo "debug: full path: " . $eclipseFSpathPrefix . "/" . $wstMirrorPrefixuri . "/" . $wstFile;
-						echo getPrereqReferenceOrName($eclipseMirrorScript, $wstMirrorPrefixuri, $wstURL, $wstFile, $eclipseFSpathPrefix);
-						echo " or <a href=\"" . $wstBuildHome . "\">equivalent</a></td>";
-						?>
-					
-					</tr>
-
-					<tr valign="top">
-						<td width="10%"></td>
-						<td>J2EE Standard Tools (JST)</td>
-						<td align="right"><?php
-						// debug
-						// echo "debug: full path: " . $eclipseFSpathPrefix . "/" . $jstMirrorPrefixuri . "/" . $jstFile;
-						echo getPrereqReferenceOrName($eclipseMirrorScript, $jstMirrorPrefixuri, $jstURL, $jstFile, $eclipseFSpathPrefix);
-						echo " or <a href=\"" . $jstBuildHome . "\">equivalent</a></td>";
-						?>
-					
-					</tr>
-
-					<tr valign="top">
-						<td width="10%"></td>
-						<td>EMF v2.4 Runtime Minimum executable code.</td>
-						<td align="right"><?php
-						echo getPrereqReferenceOrName($eclipseMirrorScript, $emfMirrorPrefixuri, $emfURL, $emfFile, $eclipseFSpathPrefix);
-						echo " or <a href=\"" . $emfBuildHome . "\">equivalent</a></td>";
-						?>
-					
-					</tr>
-
-					<tr valign="top">
-						<td width="10%"></td>
-						<td>EMF XSD v2.4 Runtime Minimum executable code.</td>
-						<td align="right"><?php
-						echo getPrereqReferenceOrName($eclipseMirrorScript, $emfxsdMirrorPrefixuri, $emfxsdURL, $emfxsdFile, $eclipseFSpathPrefix);
-						echo " or <a href=\"" . $emfxsdBuildHome . "\">equivalent</a></td>";
-						?>
-					
-					</tr>
-
-					<tr valign="top">
-						<td width="10%"></td>
-						<td>Graphical Editing Framework (GEF)</td>
-						<td align="right"><?php
-						echo getPrereqReferenceOrName($eclipseMirrorScript, $gefMirrorPrefixuri, $gefURL, $gefFile, $eclipseFSpathPrefix);
-						echo " or <a href=\"" . $gefBuildHome . "\">equivalent</a></td>";
-						?>
-					
-					</tr>
-
-					<tr valign="top">
-						<td width="10%"></td>
-						<td>Data Tools Platform (DTP)</td>
-						<td align="right"><?php
-						echo getPrereqReferenceOrName($eclipseMirrorScript, $dtpMirrorPrefixuri, $dtpURL, $dtpFile, $eclipseFSpathPrefix);
-						echo " or <a href=\"" . $dtpBuildHome . "\">equivalent</a></td>";
-						?>
-					
-					</tr>
-
-					<tr valign="middle">
-						<td width="10%"></td>
-						<td colspan="2">
-							<hr /></td>
-					</tr>
-
-					<tr valign="top">
-						<td width="10%"></td>
-						<td>Eclipse Test Framework (required only for Automated JUnit
-							tests)</td>
-						<td align="right"><?php
-						echo getPrereqReferenceOrName($eclipseMirrorScript, $eclipseMirrorPrefixuri, $testURL, $testFile, $eclipseFSpathPrefix);
-						echo " or <a href=\"" . $eclipseBuildHome . "\">equivalent</a></td>";
-						?>
-					
-					</tr>
-
-					<tr valign="top">
-						<td width="10%"></td>
-						<td>Eclipse releng tool (required only for committers to more
-							easily "release" code to a build)</td>
-						<td align="right"><?php
-						echo getPrereqReferenceOrName($eclipseMirrorScript, $eclipseMirrorPrefixuri, $eclipserelengURL, $eclipserelengFile, $eclipseFSpathPrefix);
-						echo " or <a href=\"" . $eclipseBuildHome . "\">equivalent</a></td>";
-						?>
-					
-					</tr>
-
-					<tr valign="top">
-						<td width="10%"></td>
-						<td>Third Party code from Orbit (currently much more than needed
-							for WTP, but some committers like having the whole heap in their
-							target)</td>
-						<td align="right"><?php
-						echo getPrereqReferenceOrName($eclipseMirrorScript, $orbitthirdpartyzipMirrorPrefixuri, $orbitthirdpartyzipURL, $orbitthirdpartyzipFile,$eclipseFSpathPrefix);
-						echo " or <a href=\"" . $orbitthirdpartyzipBuildHome . "\">equivalent</a></td>";
-						?>
-					
-					</tr>
-
-				</table></td>
-		</tr>
-	</table>
-
-	<!-- ***********  WTP **************  -->
-	<table border=0 cellspacing=2 cellpadding=2 width="100%">
-		<tr>
-			<td align=left valign=top colspan="5" bgcolor="#0080C0"><font
-				face="'Bitstream Vera',Helvetica,Arial" color="#FFFFFF"> Web Tools
-					Incubating Components</font>
-			</td>
-		</tr>
-
-		<tr>
-			<td align="left" valign="top" colspan="5">
-				<p>The Zip files includes the features and plugins for the Dali
-					Component.</p></td>
-		</tr>
-		<tr>
-			<td>
-				<table border=0 cellspacing=2 cellpadding=2 width="90%"
-					align="center">
-
-
-					<tr>
-						<td align="left" valign="top" width="10%"><b>Minimal</b>
-						</td>
-						<td align="left" valign="top">
-							<p>Executable code only.</p></td>
-						
-						
-
-
-
-
+                    ?> <a href="directory.txt">map files</a> <br />
                     <?php
-                    $zipfilename="wtp-jpt-${build}";
-                    $filename=$zipfilename.".zip";
-                    $zipfilesize=fileSizeForDisplay($filename);
-                    $fileShortDescription="dali";
-                    displayFileLine($downloadprefix, $filename, $zipfilesize, $fileShortDescription);
-                    ?>
-               </tr>
 
-					<tr>
-						<td align="left" valign="top" width="10%"><b>SDK</b>
-						</td>
-						<td align="left" valign="top">
-							<p>Executable code and source code.</p></td>
-						
-						
+                    if (file_exists("components")) {
+                         echo "<a href=\"components/components.php\">Misc Components</a> <br />\n";
+                    }
 
 
-
-
-                    <?php
-                    $zipfilename="wtp-jpt-sdk-${build}";
-                    $filename=$zipfilename.".zip";
-                    $zipfilesize=fileSizeForDisplay($filename);
-                    $fileShortDescription="dali sdk";
-                    displayFileLine($downloadprefix, $filename, $zipfilesize, $fileShortDescription);
-                    ?>
-               </tr>
-					<tr>
-						<td align="left" valign="top" width="10%"><b>Tests</b>
-						</td>
-						<td align="left" valign="top">
-							<p>Unit tests.</p></td>
-						
-						
-
-
-
-
-                    <?php
-                    $zipfilename="wtp-jpt-Automated-Tests-${build}";
-                    $filename=$zipfilename.".zip";
-                    $zipfilesize=fileSizeForDisplay($filename);
-                    $fileShortDescription="dali tests";
-                    displayFileLine($downloadprefix, $filename, $zipfilesize, $fileShortDescription);
-                    ?>
-               </tr>
-				</table></td>
-		
-		
-		<tr>
-	
-	</table>
-
-
-
-
-
-
-
-	<!-- ***********  Build Status **************  -->
-	<table border=0 cellspacing=2 cellpadding=2 width="100%">
-		<tr>
-			<td align=left valign=top bgcolor="#0080C0"><font
-				face="'Bitstream Vera',Helvetica,Arial" color="#FFFFFF">Status,
-					tests and other interesting details</font>
-			</td>
-		</tr>
-		<tr>
-			<td>
-				<table border=0 cellspacing=2 cellpadding=2 width="90%"
-					align="center">
-
-					<tr>
-						<td><a href="buildNotes.php">Build notes</a> <br /> <a
-							href="directory.txt">map files</a> <br />
-						
-						
-
-
-
-
-                    <?php
-
                     if ($displayTestSummary) {
 
 
@@ -476,9 +293,33 @@
                               echo "<img src=\"junit_err.gif\"/><font color=\"" . $errorColor . "\">" . $unitTests_grandTotalErrors . "</font>&nbsp;&nbsp;Total: " . $unitTests_grandTotalTests;
                          }
                          else {
-                              echo "<br /><font color=\"orange\">Unit tests are pending</font>&nbsp;&nbsp;<img src=\"pending.gif\"/>";
+                              $compileProblemMarkerFile="compilationProblems.txt";
+                              if (file_exists($compileProblemMarkerFile)) {
+                                   echo "<br /> <img src=\"compile_err.gif\"/>&nbsp;&nbsp;No unit tests available. The remaining build and tests were canceled since compilation problems were found. Check compiler output summaries.";
+                              } else {
+                                   $installLogName="p2DirectorInstall.log.txt";
+                                   if (file_exists($installLogName)) {
+                                        echo "<br /><img src=\"compile_err.gif\"/>&nbsp;&nbsp;No unit tests available. See <a href=\"" . $installLogName . "\">the p2Director install log file </a>from failed test installation attempt";
+                                   } else {
+                                        $noTestsProvidedMarkerFile="noTestsProvided.txt";
+                                        if (file_exists($noTestsProvidedMarkerFile)) {
+                                             echo "<br /><img src=\"compile_warn.gif\"/>&nbsp;&nbsp;No unit tests available. This build component does not providing any unit tests.";
+                                        } else {
+
+                                             // we may really be pending (tests still running) or maybe they failed in unexpted way?.
+                                             echo "<br /><font color=\"orange\">Unit tests ae pending, or otherwise don't exists, or there is an unanticipated build error.</font>";
+
+                                        }
+                                   }
+                              }
                          }
 
+
+
+
+
+                         echo "<br />";
+
                          echo "<br />";
                          echo "<a href=\"compileResults.php\">Compile logs: Code Bundles</a>";
 
@@ -496,6 +337,13 @@
                          echo "<img src=\"compile_warn.gif\"/><font color=orange>$test_totalWarnings</font>&nbsp;";
                          echo "<img src=\"access_err.gif\"/><font color=red>$test_totalforbiddenAccessWarningCount</font>&nbsp;";
                          echo "<img src=\"access_warn.gif\"/><font color=orange>$test_totaldiscouragedAccessWarningCount</font>&nbsp;";
+
+                         $logname="antBuilderOutput.log";
+                         if (file_exists($logname)) {
+                              echo "<br /> <a href=\"".$logname."\" type=\"text/plain\">Full Log</a> from build ". fileSizeForDisplay($logname);
+                         }
+
+
                     }
 
                     ?> <br />
@@ -503,79 +351,42 @@
                     <?php
                     if (file_exists("versioningReportName.php")) {
                          include "versioningReportName.php";
-                         $fname="${versionReportFilename}.html";
+                         $fname=$versionReportFilename.".html";
                          if (file_exists($fname)) {
                               echo "<br /> <a href='$fname'>Versioning Information</a>";
                          }
-}
-?> <?php
-echo "<br />";
-if (file_exists("./apiresults/api-progress.html"))
-{
-     echo "<br /> <a href=\"apiresults/api-progress.html\">API Progress Report</a>";
-}
-if (file_exists("./apiresults/api-info-summary.html"))
-{
-     echo "<br /> <a href=\"apiresults/api-info-summary.html\">APIs Defined by Each Component</a>";
-}
-if (file_exists("./apiresults/api-ref-compatibility.html"))
-{
-     echo "<br /> <a href=\"apiresults/api-ref-compatibility.html\">Adopter Breakage Report</a>";
-}
-if (file_exists("./apiresults/api-violation-summary.html"))
-{
-     echo "<br /> <a href=\"apiresults/api-violation-summary.html\">API Violations</a>";
-}
-if (file_exists("./apiresults/component-api-violation-all.html"))
-{
-     echo "<br /> <a href=\"apiresults/component-api-violation-all.html\">Non-API dependencies</a>";
-}
-if (file_exists("./apiresults/api-tc-summary.html"))
-{
-     echo "<br /> <a href=\"apiresults/api-tc-summary.html\">API Test Coverage</a>";
-}
-if (file_exists("./apiresults/api-javadoc-summary.html"))
-{
-     echo "<br /> <a href=\"apiresults/api-javadoc-summary.html\">API Javadoc Coverage</a>";
-}
-if (file_exists("./apiresults/api-tc-summary.html"))
-{
-     echo "<br /><br /> <a href=\"apiresults/full_test_coverage/api-tc-summary.html\">Test Coverage for All Classes and Methods</a>";
-}
-?> <?php
-if (file_exists("./perfresults/graph/performance.php"))
-{
-     echo "<br />";
-     echo "<br /> <a href=\"perfresults/graph/performance.php\">Performance Results</a>";
-     echo "<br />";
-}
-?></td>
-					</tr>
-
-
-				</table></td>
-		</tr>
-	</table>
+                    }
+                    ?></td>
+               </tr>
+          </table>
+          </td>
+     </tr>
+</table>
 
 
 
-	<!-- footer -->
-	<center>
-		<hr>
-		<p>
-			All downloads are provided under the terms and conditions of the <a
-				href="http://www.eclipse.org/legal/notice.html">Eclipse.org Software
-				User Agreement</a> unless otherwise specified.
-		</p>
+<!-- footer -->
+<center>
+<hr>
+<p>All downloads are provided under the terms and conditions of the <a
+     href="http://www.eclipse.org/legal/notice.html">Eclipse.org Software
+User Agreement</a> unless otherwise specified.</p>
 
-		<p>
-			If you have problems downloading the drops, contact the <font
-				face="'Bitstream Vera',Helvetica,Arial" size="-1"><a
-				href="mailto:webmaster@eclipse.org">webmaster</a> </font>.
-		</p>
+<p>If you have problems downloading the drops, contact the <font
+     face="'Bitstream Vera',Helvetica,Arial" size="-1"><a
+     href="mailto:webmaster@eclipse.org">webmaster</a></font>.</p>
 
-	</center>
-	<!-- end footer -->
+</center>
+<!-- end footer -->
+
+
+
+
+
+
+
+
+
 
 
 </body>
diff --git a/releng.wtpbuilder/distribution/dali.site/templateFiles/testResults.php.template.php b/releng.wtpbuilder/distribution/dali.site/templateFiles/testResults.php.template.php
new file mode 100644
index 0000000..997d11f
--- /dev/null
+++ b/releng.wtpbuilder/distribution/dali.site/templateFiles/testResults.php.template.php
@@ -0,0 +1,163 @@
+<html>
+<head>
+
+
+
+
+<?php
+//ini_set("display_errors", "true");
+//error_reporting (E_ALL);
+
+$parts = explode("/", getcwd());
+$parts2 = explode("-", $parts[count($parts) - 1]);
+$buildName = $parts2[1];
+
+echo "<title>Test Results for $buildName </title>";
+?>
+
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+
+<style>
+.bold,.bold TD,.bold TH,.bold TR {
+	font-weight: bold;
+}
+
+.numeric,.numeric TD {
+	text-align: right;
+	padding-right: 2em;
+}
+
+.normaltable,.normaltable TD,.normaltable TH {
+	font-family: Bitstream Vera Sans Mono, monospace;
+	font-size: 0.9em;
+	color: Black;
+	background-color: White;
+}
+
+.errorltable,.errortable TD,.errortable TH {
+	font-family: Bitstream Vera Sans Mono, monospace;
+	font-size: 0.9em;
+	color: Black;
+	background-color: Red;
+	font-weight: Bold;
+}
+
+.warningtable,.warningtable TD,.warningtable TH {
+	font-family: Bitstream Vera Sans Mono, monospace;
+	font-size: 0.9em;
+	color: Black;
+	background-color: khaki;
+}
+
+.extraWarningTable,.extraWarningTable TD,.extraWarningTable TH {
+	font-family: Bitstream Vera Sans Mono, monospace;
+	font-size: 0.9em;
+	color: Black;
+	background-color: Yellow;
+}
+</style>
+
+
+</head>
+<body>
+	<p>
+		<b><font face="Verdana" size="+3">Test Results</font> </b>
+	</p>
+
+	<table border=0 cellspacing=5 cellpadding=2 width="100%">
+		<tr>
+			<td align=LEFT valign=TOP colspan="3" bgcolor="#0080C0"><b><font
+					color="#FFFFFF" face="Arial,Helvetica"> Extra results and logs </font>
+			</b>
+			</td>
+		</tr>
+	</table>
+	
+	
+
+
+
+
+
+<?php
+if (file_exists("testResults"))
+{
+     $dir = dir("testResults");
+     while ($anEntry = $dir->read())
+     {
+          if ($anEntry != "." && $anEntry != ".." && $anEntry != "consolelogs" && $anEntry != "html" && $anEntry != "xml")
+
+          {
+               if (is_dir($anEntry)) {
+                    $link = "testResults/".$anEntry."/results/index.php";
+                    echo "<p><a href=\"$link\">$anEntry</a></p> \n";
+               }
+               else {
+                    // assume is file
+                    $path_parts = pathinfo($anEntry);
+                    $file_extension = $path_parts['extension'];
+                    if (isset($path_parts['filename'])) {
+                         $linkname = $path_parts['filename'];
+                    }
+                    else {
+                         $linkname = $anEntry;
+                    }
+
+                    $link = $anEntry;
+                    if ("html" === $file_extension || "php" === $file_extension || "log" === $file_extension || "txt" === $file_extension) {
+                         echo "<p><a href=testResults/" . $link . ">" . $linkname . "</a></p>\n";
+                    }
+               }
+          }
+     }
+}
+?>
+
+
+
+
+<table border=0 cellspacing=5 cellpadding=2 width="100%">
+     <tr>
+          <td align=LEFT valign=TOP colspan="3" bgcolor="#0080C0"><b><font
+               color="#FFFFFF" face="Arial,Helvetica">Unit Test Results for <?php echo "$buildName"; ?>
+          </font></b></td>
+     </tr>
+</table>
+
+<table id=tableunittestdata align="center" width="75%" border="1">
+     <tr>
+          <td class="bold" align="center" width="70%">Test Suite</td>
+          <td class="bold" align="center" width="15%">Errors &amp; Failures</td>
+          <td class="bold" align="center" width="15%">Total Tests</td>
+          <td class="bold" align="center" width="15%">Total Time (s)</td>
+     </tr>
+
+
+     %testresults%
+
+</table>
+<p></p>
+<br>
+<table border=0 cellspacing=5 cellpadding=2 width="100%">
+     <tr>
+          <td align=LEFT valign=TOP colspan="3" bgcolor="#0080C0"><b><font
+               color="#FFFFFF" face="Arial,Helvetica"> Console output logs <?php echo "$buildName"; ?>
+          </font></b></td>
+     </tr>
+</table>
+<br>
+These
+<a href="consoleLogs.php">logs</a>
+contain the console output captured while running the JUnit automated
+tests.
+<br>
+These
+<a href="httplogs.php">http logs</a>
+contain logs of http requests captured while running the JUnit automated
+tests.
+<br>
+<br>
+
+
+</body>
+</html>