Author: nickboldt
Date: 2011-09-20 01:20:00 -0400 (Tue, 20 Sep 2011)
New Revision: 34874
Added:
trunk/build/aggregate/bottests-site/site/site.xsl
trunk/build/aggregate/webtools-site/site.xsl
Modified:
trunk/build/aggregate/bottests-site/site/build.xml
trunk/build/aggregate/bottests-site/site/index-template.html
trunk/build/aggregate/site/index-template.html
trunk/build/aggregate/soa-site/index-template.html
trunk/build/aggregate/webtools-site/build.xml
trunk/build/aggregate/webtools-site/index-template.html
Log:
https://issues.jboss.org/browse/JBIDE-9743 add xslt to bottests and webtools sites; fix
fonts for soa and core sites
Modified: trunk/build/aggregate/bottests-site/site/build.xml
===================================================================
--- trunk/build/aggregate/bottests-site/site/build.xml 2011-09-20 05:12:36 UTC (rev
34873)
+++ trunk/build/aggregate/bottests-site/site/build.xml 2011-09-20 05:20:00 UTC (rev
34874)
@@ -40,10 +40,23 @@
<pathelement location="${COMMON_TOOLS}/ant-contrib.jar" />
</classpath>
</taskdef>
+
+ <available file="${COMMON_TOOLS}/saxon.jar" type="file"
property="saxon.jar.exists" />
+ <antcall target="get.saxon" />
</target>
<target name="custom.build" description="aggregate update site
extras"
depends="init,check.target,add.associate.sites,add.web.content,pack.zip,collect.zips,collect.metadata,create.summary.file"
/>
+ <target name="get.saxon" unless="saxon.jar.exists">
+ <!-- or use
http://downloads.sourceforge.net/saxon/saxonhe9-3-0-4j.zip ? -->
+ <property name="SAXON_MIRROR"
value="http://downloads.sourceforge.net/project/saxon/Saxon-HE/9.3/s...
/>
+ <get usetimestamp="true"
dest="${COMMON_TOOLS}/saxonhe9-3-0-4j.zip" src="${SAXON_MIRROR}"
/>
+ <mkdir dir="${java.io.tmpdir}/saxonhe9-3-0-4j.zip_" />
+ <unzip src="${COMMON_TOOLS}/saxonhe9-3-0-4j.zip"
dest="${java.io.tmpdir}/saxonhe9-3-0-4j.zip_" overwrite="true" />
+ <copy file="${java.io.tmpdir}/saxonhe9-3-0-4j.zip_/saxon9he.jar"
tofile="${COMMON_TOOLS}/saxon.jar" failonerror="true" />
+ <delete dir="${java.io.tmpdir}/saxonhe9-3-0-4j.zip_"
includeemptydirs="true" quiet="true" />
+ </target>
+
<!-- = = = = = = = = = = = = = = = = =
macrodef: fetchZipsFromList - given a list of zips in zip.list.txt, fetch those
zips
= = = = = = = = = = = = = = = = = -->
@@ -283,11 +296,11 @@
<for param="location"
list="${repository.children.child.location}">
<sequential>
<var name="counter" value="${counter}0" />
- <var name="i" unset="true"/>
+ <var name="i" unset="true" />
<length property="i" string="${counter}" />
<if>
<not>
- <contains string="@{location}"
substring="/staging.previous/"/>
+ <contains string="@{location}"
substring="/staging.previous/" />
</not>
<then>
<if>
@@ -317,7 +330,7 @@
</sequential>
</for>
<var name="counter" unset="true" />
- <var name="i" unset="true"/>
+ <var name="i" unset="true" />
<delete file="${aggregate.zips.dir}/compositeArtifacts.xml"
quiet="true" />
</then>
@@ -444,6 +457,9 @@
</else>
</if>
+ <!-- get site.xml as HTML, then load into ${site.contents} in order to merge into
index.html -->
+ <antcallback target="transform.site.xml" return="site.contents"
/>
+
<copy todir="${output.dir}" overwrite="true">
<fileset file="index-template.html" />
<mapper type="merge" to="index.html" />
@@ -457,6 +473,18 @@
</copy>
</target>
+ <target name="transform.site.xml">
+ <!-- turn site.xml into site.html via site.xsl -->
+ <delete quiet="true" file="${update.site.source.dir}/site.html"
/>
+ <xslt style="site.xsl" in="${update.site.source.dir}/site.xml"
out="${update.site.source.dir}/site.html" force="true">
+ <classpath location="${COMMON_TOOLS}/saxon.jar" />
+ </xslt>
+ <!-- merge contents of site.html into index.html, then remove site.html -->
+ <loadfile property="site.contents"
srcfile="${update.site.source.dir}/site.html" failonerror="false"
/>
+ <property name="site.contents" value="" />
+ <delete file="${update.site.source.dir}/site.html" quiet="true"
/>
+ </target>
+
<!-- look for
http://download.jboss.org/jbosstools/builds/staging/jbosstools-3.2.0.M2.c...;
if found, load file and use ${ALL_ZIPS} to get list of relative path zips to fetch
-->
<target name="collect.zips" description="collect zips from the sites
we aggregated">
Modified: trunk/build/aggregate/bottests-site/site/index-template.html
===================================================================
--- trunk/build/aggregate/bottests-site/site/index-template.html 2011-09-20 05:12:36 UTC
(rev 34873)
+++ trunk/build/aggregate/bottests-site/site/index-template.html 2011-09-20 05:20:00 UTC
(rev 34874)
@@ -6,17 +6,20 @@
</style>
</head>
<body marginheight="0" marginwidth="0" leftmargin="0"
topmargin="0">
+<center>
<table marginheight="0" marginwidth="0" leftmargin="0"
topmargin="0"
- cellspacing="0" cellpadding="0">
+ cellspacing="0" cellpadding="0" width="920"
class="bodyText">
<tr>
- <td colspan="2"><img
+ <td colspan="3"><img
src="https://www.jboss.org/dms/tools/images/tools-banner.png"
/></td>
</tr>
<tr>
- <td>  </td>
+ <td>      </td>
+ <td>      </td>
+ <td>      </td>
</tr>
<tr>
- <td>  </td>
+ <td>      </td>
<td>
<h2 class="title">JBoss Tools - Bot Tests - ${update.site.description}
Update Site</h2>
<table width="100%">
@@ -28,7 +31,7 @@
<td class="bodyText">
<p class="bodyText">This is the
<b>${update.site.description}</b>
Update Site for JBoss Tools - Bot Tests. See <a class="link"
-
href="http://www.jboss.org/tools/download/update">Installation
+
href="http://www.jboss.org/tools/download/installation/update_3_3&qu...
Instructions</a>.</p>
</td>
</tr>
@@ -53,29 +56,26 @@
<p class="bodyText">You can also download JBoss Tools as
individual zips for offline installation. See <a class="link"
href="http://www.jboss.org/tools/download">JBoss Tools
- Downloads</a>.</p>
- </td>
- </tr>
-
- <tr class="dark-row" style="height: 30px">
- <td class="bodyText">
- <p class="bodyText">For more information, see <a
+ Downloads</a>.<br/>
+ If you downloaded this site as a zip, see <a
href="README.installation.txt">Installation README</a>. See also <a
href="http://www.jboss.org/tools/download/installation">Inst...
methods</a>.</p>
</td>
</tr>
- <tr>
- <td class="spacer"><br />
- </td>
- <td class="spacer"><br />
- </td>
- </tr>
</table>
</td>
+ <td>      </td>
</tr>
<tr>
<td></td>
<td>
+ ${site.contents}
+ </td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>
<table width="100%">
<tr class="header">
<td class="sub-header" width="100%"><span>
Installation
@@ -131,4 +131,5 @@
</td>
</tr>
</table>
+</center>
</html>
Added: trunk/build/aggregate/bottests-site/site/site.xsl
===================================================================
--- trunk/build/aggregate/bottests-site/site/site.xsl (rev 0)
+++ trunk/build/aggregate/bottests-site/site/site.xsl 2011-09-20 05:20:00 UTC (rev 34874)
@@ -0,0 +1,118 @@
+<xsl:stylesheet version="2.0"
+
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xalan="http://xml.apache.org/xalan"
+
xmlns:saxon="http://saxon.sf.net/"
xmlns="http://www.w3.org/1999/xhtml"
+ extension-element-prefixes="saxon">
+ <xsl:output method="html" indent="yes" />
+ <xsl:template match="/site">
+ <br />
+ <table cellspacing="2" cellpadding="0"
border="0">
+ <tr style="background-color:#DDDDDD">
+ <th style="font-size:small">Feature</th>
+ <th style="font-size:small">Version</th>
+ <th style="font-size:small">
+ Feature Categor(ies)
+ </th>
+ </tr>
+ <!-- JBoss features -->
+ <xsl:for-each select="feature[contains(@id,'jboss')]">
+ <xsl:sort select="@id" />
+ <xsl:variable name="rowCol">
+ <xsl:if test="position() mod 2 = 1">
+ #EEEEEE
+ </xsl:if>
+ <xsl:if test="position() mod 2 = 0">
+ #FFFFFF
+ </xsl:if>
+ </xsl:variable>
+
+ <tr style="background-color:{$rowCol}">
+ <td class="rowLine">
+ <a href="{@url}" style="font-size:x-small">
+ <xsl:value-of select="@id" />
+ </a>
+ </td>
+ <td>
+ <span style="font-size:x-small">
+ <xsl:value-of select="@version" />
+ </span>
+ </td>
+ <td>
+ <xsl:choose>
+ <xsl:when test="category">
+ <xsl:for-each select="category">
+ <span style="font-size:x-small">
+ |
+ <xsl:value-of select="@name" />
+ </span>
+ </xsl:for-each>
+ </xsl:when>
+ </xsl:choose>
+ </td>
+ </tr>
+ </xsl:for-each>
+ <tr style="background-color:#DDDDDD">
+ <th style="font-size:small">Feature</th>
+ <th style="font-size:small">Version</th>
+ <th style="font-size:small">
+ Feature Categor(ies)
+ </th>
+ </tr>
+ <!-- other features -->
+ <xsl:for-each select="feature[not(contains(@id,'jboss'))]">
+ <xsl:sort select="@id" />
+ <xsl:variable name="rowCol">
+ <xsl:if test="position() mod 2 = 1">
+ #EEEEEE
+ </xsl:if>
+ <xsl:if test="position() mod 2 = 0">
+ #FFFFFF
+ </xsl:if>
+ </xsl:variable>
+
+ <tr style="background-color:{$rowCol}">
+ <td class="rowLine">
+ <a href="{@url}" style="font-size:x-small">
+ <xsl:value-of select="@id" />
+ </a>
+ </td>
+ <td>
+ <span style="font-size:x-small">
+ <xsl:value-of select="@version" />
+ </span>
+ </td>
+ <td>
+ <xsl:choose>
+ <xsl:when test="category">
+ <xsl:for-each select="category">
+ <span style="font-size:x-small">
+ |
+ <xsl:value-of select="@name" />
+ </span>
+ </xsl:for-each>
+ </xsl:when>
+ </xsl:choose>
+ </td>
+ </tr>
+ </xsl:for-each>
+ <tr style="background-color:#DDDDDD">
+ <th colspan="1"
style="font-size:small">Metadata</th>
+ <th colspan="1" style="font-size:small"></th>
+ <th colspan="1" style="font-size:small"></th>
+ </tr>
+ <tr style="background-color:#EEEEEE">
+ <td class="rowLine">
+ <a href="site.xml"
style="font-size:x-small">site.xml</a>
+ ::
+ <a href="artifacts.jar"
style="font-size:x-small">artifacts.jar</a>
+ ::
+ <a href="content.jar"
style="font-size:x-small">content.jar</a>
+ </td>
+ <td class="rowLine">
+ </td>
+ <td class="rowLine">
+ </td>
+ </tr>
+ </table>
+ <br />
+ </xsl:template>
+</xsl:stylesheet>
Modified: trunk/build/aggregate/site/index-template.html
===================================================================
--- trunk/build/aggregate/site/index-template.html 2011-09-20 05:12:36 UTC (rev 34873)
+++ trunk/build/aggregate/site/index-template.html 2011-09-20 05:20:00 UTC (rev 34874)
@@ -8,7 +8,7 @@
<body marginheight="0" marginwidth="0" leftmargin="0"
topmargin="0">
<center>
<table marginheight="0" marginwidth="0" leftmargin="0"
topmargin="0"
- cellspacing="0" cellpadding="0" width="920">
+ cellspacing="0" cellpadding="0" width="920"
class="bodyText">
<tr>
<td colspan="3"><img
src="https://www.jboss.org/dms/tools/images/tools-banner.png"
/></td>
Modified: trunk/build/aggregate/soa-site/index-template.html
===================================================================
--- trunk/build/aggregate/soa-site/index-template.html 2011-09-20 05:12:36 UTC (rev
34873)
+++ trunk/build/aggregate/soa-site/index-template.html 2011-09-20 05:20:00 UTC (rev
34874)
@@ -8,7 +8,7 @@
<body marginheight="0" marginwidth="0" leftmargin="0"
topmargin="0">
<center>
<table marginheight="0" marginwidth="0" leftmargin="0"
topmargin="0"
- cellspacing="0" cellpadding="0" width="920">
+ cellspacing="0" cellpadding="0" width="920"
class="bodyText">
<tr>
<td colspan="3"><img
src="https://www.jboss.org/dms/tools/images/tools-banner.png"
/></td>
Modified: trunk/build/aggregate/webtools-site/build.xml
===================================================================
--- trunk/build/aggregate/webtools-site/build.xml 2011-09-20 05:12:36 UTC (rev 34873)
+++ trunk/build/aggregate/webtools-site/build.xml 2011-09-20 05:20:00 UTC (rev 34874)
@@ -40,10 +40,23 @@
<pathelement location="${COMMON_TOOLS}/ant-contrib.jar" />
</classpath>
</taskdef>
+
+ <available file="${COMMON_TOOLS}/saxon.jar" type="file"
property="saxon.jar.exists" />
+ <antcall target="get.saxon" />
</target>
<target name="custom.build" description="aggregate update site
extras"
depends="init,check.target,add.associate.sites,add.web.content,pack.zip,collect.zips,collect.metadata,create.summary.file"
/>
+ <target name="get.saxon" unless="saxon.jar.exists">
+ <!-- or use
http://downloads.sourceforge.net/saxon/saxonhe9-3-0-4j.zip ? -->
+ <property name="SAXON_MIRROR"
value="http://downloads.sourceforge.net/project/saxon/Saxon-HE/9.3/s...
/>
+ <get usetimestamp="true"
dest="${COMMON_TOOLS}/saxonhe9-3-0-4j.zip" src="${SAXON_MIRROR}"
/>
+ <mkdir dir="${java.io.tmpdir}/saxonhe9-3-0-4j.zip_" />
+ <unzip src="${COMMON_TOOLS}/saxonhe9-3-0-4j.zip"
dest="${java.io.tmpdir}/saxonhe9-3-0-4j.zip_" overwrite="true" />
+ <copy file="${java.io.tmpdir}/saxonhe9-3-0-4j.zip_/saxon9he.jar"
tofile="${COMMON_TOOLS}/saxon.jar" failonerror="true" />
+ <delete dir="${java.io.tmpdir}/saxonhe9-3-0-4j.zip_"
includeemptydirs="true" quiet="true" />
+ </target>
+
<!-- = = = = = = = = = = = = = = = = =
macrodef: fetchZipsFromList - given a list of zips in zip.list.txt, fetch those
zips
= = = = = = = = = = = = = = = = = -->
@@ -283,11 +296,11 @@
<for param="location"
list="${repository.children.child.location}">
<sequential>
<var name="counter" value="${counter}0" />
- <var name="i" unset="true"/>
+ <var name="i" unset="true" />
<length property="i" string="${counter}" />
<if>
<not>
- <contains string="@{location}"
substring="/staging.previous/"/>
+ <contains string="@{location}"
substring="/staging.previous/" />
</not>
<then>
<if>
@@ -317,7 +330,7 @@
</sequential>
</for>
<var name="counter" unset="true" />
- <var name="i" unset="true"/>
+ <var name="i" unset="true" />
<delete file="${aggregate.zips.dir}/compositeArtifacts.xml"
quiet="true" />
</then>
@@ -444,6 +457,9 @@
</else>
</if>
+ <!-- get site.xml as HTML, then load into ${site.contents} in order to merge into
index.html -->
+ <antcallback target="transform.site.xml" return="site.contents"
/>
+
<copy todir="${output.dir}" overwrite="true">
<fileset file="index-template.html" />
<mapper type="merge" to="index.html" />
@@ -457,6 +473,18 @@
</copy>
</target>
+ <target name="transform.site.xml">
+ <!-- turn site.xml into site.html via site.xsl -->
+ <delete quiet="true" file="${update.site.source.dir}/site.html"
/>
+ <xslt style="site.xsl" in="${update.site.source.dir}/site.xml"
out="${update.site.source.dir}/site.html" force="true">
+ <classpath location="${COMMON_TOOLS}/saxon.jar" />
+ </xslt>
+ <!-- merge contents of site.html into index.html, then remove site.html -->
+ <loadfile property="site.contents"
srcfile="${update.site.source.dir}/site.html" failonerror="false"
/>
+ <property name="site.contents" value="" />
+ <delete file="${update.site.source.dir}/site.html" quiet="true"
/>
+ </target>
+
<!-- look for
http://download.jboss.org/jbosstools/builds/staging/jbosstools-3.2.0.M2.c...;
if found, load file and use ${ALL_ZIPS} to get list of relative path zips to fetch
-->
<target name="collect.zips" description="collect zips from the sites
we aggregated">
Modified: trunk/build/aggregate/webtools-site/index-template.html
===================================================================
--- trunk/build/aggregate/webtools-site/index-template.html 2011-09-20 05:12:36 UTC (rev
34873)
+++ trunk/build/aggregate/webtools-site/index-template.html 2011-09-20 05:20:00 UTC (rev
34874)
@@ -6,17 +6,20 @@
</style>
</head>
<body marginheight="0" marginwidth="0" leftmargin="0"
topmargin="0">
+<center>
<table marginheight="0" marginwidth="0" leftmargin="0"
topmargin="0"
- cellspacing="0" cellpadding="0">
+ cellspacing="0" cellpadding="0" width="920"
class="bodyText">
<tr>
- <td colspan="2"><img
+ <td colspan="3"><img
src="https://www.jboss.org/dms/tools/images/tools-banner.png"
/></td>
</tr>
<tr>
- <td>  </td>
+ <td>      </td>
+ <td>      </td>
+ <td>      </td>
</tr>
<tr>
- <td>  </td>
+ <td>      </td>
<td>
<h2 class="title">JBoss Tools - Web Tools - ${update.site.description}
Update Site</h2>
<table width="100%">
@@ -28,7 +31,7 @@
<td class="bodyText">
<p class="bodyText">This is the
<b>${update.site.description}</b>
Update Site for JBoss Tools - Web Tools. See <a class="link"
-
href="http://www.jboss.org/tools/download/update">Installation
+
href="http://www.jboss.org/tools/download/installation/update_3_3&qu...
Instructions</a>.</p>
</td>
</tr>
@@ -52,29 +55,26 @@
<p class="bodyText">You can also download JBoss Tools as
individual zips for offline installation. See <a class="link"
href="http://www.jboss.org/tools/download">JBoss Tools
- Downloads</a>.</p>
- </td>
- </tr>
-
- <tr class="dark-row" style="height: 30px">
- <td class="bodyText">
- <p class="bodyText">For more information, see <a
+ Downloads</a>.<br/>
+ If you downloaded this site as a zip, see <a
href="README.installation.txt">Installation README</a>. See also <a
href="http://www.jboss.org/tools/download/installation">Inst...
methods</a>.</p>
</td>
</tr>
- <tr>
- <td class="spacer"><br />
- </td>
- <td class="spacer"><br />
- </td>
- </tr>
</table>
</td>
+ <td>      </td>
</tr>
<tr>
<td></td>
<td>
+ ${site.contents}
+ </td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>
<table width="100%">
<tr class="header">
<td class="sub-header" width="100%"><span>
Installation
@@ -130,4 +130,5 @@
</td>
</tr>
</table>
+</center>
</html>
Added: trunk/build/aggregate/webtools-site/site.xsl
===================================================================
--- trunk/build/aggregate/webtools-site/site.xsl (rev 0)
+++ trunk/build/aggregate/webtools-site/site.xsl 2011-09-20 05:20:00 UTC (rev 34874)
@@ -0,0 +1,118 @@
+<xsl:stylesheet version="2.0"
+
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xalan="http://xml.apache.org/xalan"
+
xmlns:saxon="http://saxon.sf.net/"
xmlns="http://www.w3.org/1999/xhtml"
+ extension-element-prefixes="saxon">
+ <xsl:output method="html" indent="yes" />
+ <xsl:template match="/site">
+ <br />
+ <table cellspacing="2" cellpadding="0"
border="0">
+ <tr style="background-color:#DDDDDD">
+ <th style="font-size:small">Feature</th>
+ <th style="font-size:small">Version</th>
+ <th style="font-size:small">
+ Feature Categor(ies)
+ </th>
+ </tr>
+ <!-- JBoss features -->
+ <xsl:for-each select="feature[contains(@id,'jboss')]">
+ <xsl:sort select="@id" />
+ <xsl:variable name="rowCol">
+ <xsl:if test="position() mod 2 = 1">
+ #EEEEEE
+ </xsl:if>
+ <xsl:if test="position() mod 2 = 0">
+ #FFFFFF
+ </xsl:if>
+ </xsl:variable>
+
+ <tr style="background-color:{$rowCol}">
+ <td class="rowLine">
+ <a href="{@url}" style="font-size:x-small">
+ <xsl:value-of select="@id" />
+ </a>
+ </td>
+ <td>
+ <span style="font-size:x-small">
+ <xsl:value-of select="@version" />
+ </span>
+ </td>
+ <td>
+ <xsl:choose>
+ <xsl:when test="category">
+ <xsl:for-each select="category">
+ <span style="font-size:x-small">
+ |
+ <xsl:value-of select="@name" />
+ </span>
+ </xsl:for-each>
+ </xsl:when>
+ </xsl:choose>
+ </td>
+ </tr>
+ </xsl:for-each>
+ <tr style="background-color:#DDDDDD">
+ <th style="font-size:small">Feature</th>
+ <th style="font-size:small">Version</th>
+ <th style="font-size:small">
+ Feature Categor(ies)
+ </th>
+ </tr>
+ <!-- other features -->
+ <xsl:for-each select="feature[not(contains(@id,'jboss'))]">
+ <xsl:sort select="@id" />
+ <xsl:variable name="rowCol">
+ <xsl:if test="position() mod 2 = 1">
+ #EEEEEE
+ </xsl:if>
+ <xsl:if test="position() mod 2 = 0">
+ #FFFFFF
+ </xsl:if>
+ </xsl:variable>
+
+ <tr style="background-color:{$rowCol}">
+ <td class="rowLine">
+ <a href="{@url}" style="font-size:x-small">
+ <xsl:value-of select="@id" />
+ </a>
+ </td>
+ <td>
+ <span style="font-size:x-small">
+ <xsl:value-of select="@version" />
+ </span>
+ </td>
+ <td>
+ <xsl:choose>
+ <xsl:when test="category">
+ <xsl:for-each select="category">
+ <span style="font-size:x-small">
+ |
+ <xsl:value-of select="@name" />
+ </span>
+ </xsl:for-each>
+ </xsl:when>
+ </xsl:choose>
+ </td>
+ </tr>
+ </xsl:for-each>
+ <tr style="background-color:#DDDDDD">
+ <th colspan="1"
style="font-size:small">Metadata</th>
+ <th colspan="1" style="font-size:small"></th>
+ <th colspan="1" style="font-size:small"></th>
+ </tr>
+ <tr style="background-color:#EEEEEE">
+ <td class="rowLine">
+ <a href="site.xml"
style="font-size:x-small">site.xml</a>
+ ::
+ <a href="artifacts.jar"
style="font-size:x-small">artifacts.jar</a>
+ ::
+ <a href="content.jar"
style="font-size:x-small">content.jar</a>
+ </td>
+ <td class="rowLine">
+ </td>
+ <td class="rowLine">
+ </td>
+ </tr>
+ </table>
+ <br />
+ </xsl:template>
+</xsl:stylesheet>