From c69daf961eeb75bca3ee41b9edbbbcc83ac49dbf Mon Sep 17 00:00:00 2001
From: david_williams <david_williams>
Date: Fri, 17 Oct 2008 01:45:00 +0000
Subject: [PATCH] 200247 (to HEAD) Create separate build/distributions for the
 Faceted Project Framework

---
 .../distribution/wtp.build/build.xml          |  64 +++++++++-
 .../templateFiles/index.html.template.php     | 116 +++++++++++++++++-
 2 files changed, 177 insertions(+), 3 deletions(-)

diff --git a/releng.wtpbuilder/distribution/wtp.build/build.xml b/releng.wtpbuilder/distribution/wtp.build/build.xml
index 537566ace..2f9897714 100644
--- a/releng.wtpbuilder/distribution/wtp.build/build.xml
+++ b/releng.wtpbuilder/distribution/wtp.build/build.xml
@@ -247,6 +247,10 @@
         <delete
             dir="${buildDirectory}/tempforrezipping"
             failonerror="false"/>
+            
+        <!-- make an empty directory. Can prevent a failure later, when doing some test builds -->
+        <mkdir dir="${buildDirectory}/tempforrezipping"/>
+           
         <exec
             dir="${buildDirectory}/${buildLabel}"
             executable="unzip"
@@ -271,7 +275,9 @@
         </exec>
         <zip
             destfile="${buildDirectory}/${buildLabel}/${archiveName}"
-            basedir="${buildDirectory}/tempforrezipping"/>
+            basedir="${buildDirectory}/tempforrezipping"
+            whenempty="create" />
+            
         <delete
             dir="${buildDirectory}/tempforrezipping"
             failonerror="false"/>
@@ -377,6 +383,62 @@
             </zipfileset>
         </zip>
 
+        <ant
+            antfile="${wtp.builder.home}/scripts/build/buildutilities.xml"
+            target="createChecksums">
+            <property
+                name="buildDirectory"
+                value="${buildDirectory}"/>
+            <property
+                name="buildLabel"
+                value="${buildLabel}"/>
+            <property
+                name="archiveName"
+                value="wtp-common-fproj-${buildLabel}.zip"/>
+        </ant>
+
+        <ant
+            antfile="${wtp.builder.home}/scripts/build/buildutilities.xml"
+            target="createChecksums">
+            <property
+                name="buildDirectory"
+                value="${buildDirectory}"/>
+            <property
+                name="buildLabel"
+                value="${buildLabel}"/>
+            <property
+                name="archiveName"
+                value="wtp-common-fproj-sdk-${buildLabel}.zip"/>
+        </ant>
+
+        <ant
+            antfile="${wtp.builder.home}/scripts/build/buildutilities.xml"
+            target="createChecksums">
+            <property
+                name="buildDirectory"
+                value="${buildDirectory}"/>
+            <property
+                name="buildLabel"
+                value="${buildLabel}"/>
+            <property
+                name="archiveName"
+                value="wtp-common-fproj-enablement-jdt-${buildLabel}.zip"/>
+        </ant>
+
+        <ant
+            antfile="${wtp.builder.home}/scripts/build/buildutilities.xml"
+            target="createChecksums">
+            <property
+                name="buildDirectory"
+                value="${buildDirectory}"/>
+            <property
+                name="buildLabel"
+                value="${buildLabel}"/>
+            <property
+                name="archiveName"
+                value="wtp-common-fproj-enablement-jdt-sdk-${buildLabel}.zip"/>
+        </ant>
+
     </target>
 
 </project>
\ No newline at end of file
diff --git a/releng.wtpbuilder/distribution/wtp.site/templateFiles/index.html.template.php b/releng.wtpbuilder/distribution/wtp.site/templateFiles/index.html.template.php
index bad40fe3d..5c1d10bfa 100644
--- a/releng.wtpbuilder/distribution/wtp.site/templateFiles/index.html.template.php
+++ b/releng.wtpbuilder/distribution/wtp.site/templateFiles/index.html.template.php
@@ -460,8 +460,9 @@ if (!stristr($serverName, "eclipse.org") && !stristr($serverName,"you.are.at.ecl
 
 	<tr>
 		<td align="left" valign="top" colspan="5">
-		<p>The WST zip files includes the features and plugins from the WST
-		Project.</p>
+		<p>These zip files includes the features and plugins for (non-Java) Web Development.</p>
+		<p>Note: you only need this zip file(s) if you want to use only this function. If 
+		you download the WTP zip file, it is already included there.</p>
 		</td>
 	</tr>
 	<tr>
@@ -538,7 +539,118 @@ if (!stristr($serverName, "eclipse.org") && !stristr($serverName,"you.are.at.ecl
 
 </table>
 
+<?php 
 
+$bellwether_zipfilename="wtp-common-fproj-".$build.".zip";
+if (file_exists($bellwether_zipfilename)) {
+// if-then-include section
+// include this whole section if (and only if) the bellwether file exists.
+// For example, it may not exist on builds for "old" streams.
+?>
+
+<!-- ***********  Faceted Project Framework **************  -->
+<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">Faceted Project Framework</font></td>
+	</tr>
+
+	<tr>
+		<td align="left" valign="top" colspan="5">
+		<p>The Faceted Project Framework allows creation of modular projects in Eclipse so that
+		the user can easily add and remove functionality. All WTP projects leverage this framework, but
+		it can also be used independent of WTP.</p>
+		<p>The JDT Enablement component extends the Faceted Project Framework to integrate with
+		Java Development Tools. The component includes the Java facet, modeling of the JVM-based
+		runtimes and tools for simplifying Java library management for facet authors.</p>
+		<p>Note: you only need this zip file(s) if you want to use only this function. If 
+    you download the WTP (or WST) zip file, it is already included there.</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>Framework</b></td>
+				<td align="left" valign="top">
+				<p>Runtime</p>
+				</td>
+				<?php
+
+				$zipfilename="wtp-common-fproj-$build";
+
+				$filename=$zipfilename.".zip";
+				$zipfilesize=fileSizeForDisplay($filename);
+				$fileShortDescription="wtp-common-fproj";
+				displayFileLine($downloadprefix, $filename, $zipfilesize, $fileShortDescription);
+
+				?>
+			</tr>
+
+			<tr>
+				<td align="left" valign="top" width="10%"><b>&nbsp;</b></td>
+				<td align="left" valign="top">
+				<p>SDK</p>
+				</td>
+				<?php
+
+				$zipfilename="wtp-common-fproj-sdk-$build";
+
+				$filename=$zipfilename.".zip";
+				$zipfilesize=fileSizeForDisplay($filename);
+				$fileShortDescription="wtp-common-fproj-sdk";
+				displayFileLine($downloadprefix, $filename, $zipfilesize, $fileShortDescription);
+
+				?>
+			</tr>
+
+			<tr>
+				<td align="left" valign="top" width="10%"><b>JDT Enablement</b></td>
+				<td align="left" valign="top">
+				<p>Runtime</p>
+				</td>
+				<?php
+
+				$zipfilename="wtp-common-fproj-enablement-jdt-$build";
+
+				$filename=$zipfilename.".zip";
+				$zipfilesize=fileSizeForDisplay($filename);
+				$fileShortDescription="wtp-common-fproj-enablement-jdt";
+				displayFileLine($downloadprefix, $filename, $zipfilesize, $fileShortDescription);
+
+				?>
+			</tr>
+
+			<tr>
+				<td align="left" valign="top" width="10%"><b>&nbsp;</b></td>
+				<td align="left" valign="top">
+				<p>SDK</p>
+				</td>
+				<?php
+
+				$zipfilename="wtp-common-fproj-enablement-jdt-sdk-$build";
+
+				$filename=$zipfilename.".zip";
+				$zipfilesize=fileSizeForDisplay($filename);
+				$fileShortDescription="wtp-common-fproj-enablement-jdt-sdk";
+				displayFileLine($downloadprefix, $filename, $zipfilesize, $fileShortDescription);
+
+				?>
+			</tr>
+
+		</table>
+		</td>
+	
+	<tr>
+
+</table>
+
+<?php
+// end the if-then-include section
+}
+?>
 
 
 <!-- ***********  Build Status **************  -->
-- 
GitLab