Author: nickboldt
Date: 2010-09-30 17:38:30 -0400 (Thu, 30 Sep 2010)
New Revision: 25363
Modified:
trunk/build/target-platform/target2p2mirror.xml
trunk/build/target-platform/target2p2mirrorXml.xsl
Log:
add descriptions and comments; useLatest is now a parameter
Modified: trunk/build/target-platform/target2p2mirror.xml
===================================================================
--- trunk/build/target-platform/target2p2mirror.xml 2010-09-30 21:37:29 UTC (rev 25362)
+++ trunk/build/target-platform/target2p2mirror.xml 2010-09-30 21:38:30 UTC (rev 25363)
@@ -1,13 +1,29 @@
<project default="custom.build" name="jbosstools target platform
p2.mirror generator">
<property name="targetFile" value="e361-wtp322.target" />
- <target name="custom.build" depends="gen.p2mirror.script,
run.p2mirror.script" />
+ <!-- if useLatest = true, omit versions from p2.mirror script to fetch latest version
available;
+ if useLatest = false, include versions and fetch specific versions requested. -->
+ <property name="useLatest" value="true" />
+ <target name="custom.build" depends="gen.p2mirror.script" />
+
<target name="gen.p2mirror.script" description="use XSLT to generate a
p2.mirror script from .target">
- <echo level="verbose">Generate ${targetFile}.p2mirror.xml from
${targetFile}</echo>
- <xslt style="target2p2mirrorXml.xsl" in="${targetFile}"
out="${targetFile}.p2mirror.xml" processor="trax" />
+ <echo level="verbose">Generate ${targetFile}.p2mirror.xml from
${targetFile} using useLatest=${useLatest}" />
+</echo>
+ <delete file="${targetFile}.p2mirror.xml" quiet="true" />
+ <xslt style="target2p2mirrorXml.xsl" in="${targetFile}"
out="${targetFile}.p2mirror.xml" processor="trax">
+ <param name="useLatest" expression="${useLatest}" />
+ </xslt>
+ <echo>-----------
+
+ Next, be sure to run the resulting p2.mirror script.
+ You may need to run it a few times for it to complete
+ successfully (due to network timeouts and invalid mirrors).
+
+ For instructions on running the script, do this:
+
+ ant -f ${targetFile}.p2mirror.xml help
+ </echo>
</target>
- <target name="run.p2mirror.script" />
-
</project>
Modified: trunk/build/target-platform/target2p2mirrorXml.xsl
===================================================================
--- trunk/build/target-platform/target2p2mirrorXml.xsl 2010-09-30 21:37:29 UTC (rev
25362)
+++ trunk/build/target-platform/target2p2mirrorXml.xsl 2010-09-30 21:38:30 UTC (rev
25363)
@@ -1,26 +1,28 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- version="1.0">
+<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ version="2.0">
+<!--
+ This XSLT is used by target2p2mirror.xml to generate a p2.mirror ant script from a
.target file
+-->
<xsl:output method="xml" indent="yes" encoding="UTF-8"
version="1.0" />
- <xsl:decimal-format decimal-separator="."
- grouping-separator="," />
- <!-- should we include {@version} for specific ver, or 0.0.0 for latest
- avail? -->
- <xsl:param name="useLatest" select="'true'" />
+ <!-- if useLatest = true, omit versions from p2.mirror script to fetch latest version
available;
+ if useLatest = false, include versions and fetch specific versions requested. -->
+ <xsl:param name="useLatest" select="'true'"
as="xs:string"/>
- <xsl:param name="verbose" select="'${verbose}'" />
- <xsl:param name="followStrict" select="'${followStrict}'"
/>
- <xsl:param name="destination" select="'file:${repo.dir}'"
/>
+ <xsl:param name="verbose" select="'${verbose}'"
as="xs:string"/>
+ <xsl:param name="followStrict" select="'${followStrict}'"
as="xs:string"/>
+ <xsl:param name="destination" select="'file:${repo.dir}'"
as="xs:string"/>
- <xsl:variable name="platformFilter"
- select="concat(/target/environment/os/text(), ',',
/target/environment/ws/text(), ',', /target/environment/arch/text())" />
-
<xsl:template match="target">
<project name="Download target platform"
default="download.target.platform">
<target name="help">
<echo>
+ Generated with useLatest = <xsl:value-of select="$useLatest"/>
+
+ ---
+
Use followStrict="true" to prevent downloading all
requirements not included in the target platform
or