[jbosstools-commits] JBoss Tools SVN: r43471 - trunk/build/target-platform.
jbosstools-commits at lists.jboss.org
jbosstools-commits at lists.jboss.org
Thu Sep 6 12:20:56 EDT 2012
Author: nickboldt
Date: 2012-09-06 12:20:55 -0400 (Thu, 06 Sep 2012)
New Revision: 43471
Modified:
trunk/build/target-platform/target2targetTemplate.xsl
trunk/build/target-platform/targetUpdateFromRepo.xml
Log:
instead of regenerating .target file with a single version of an IU when there are multiple versions present (and needed) omit those entries. In future, would be better to regen whole nodes instead of just the versions so that .target file could list ALL IUs present (features/plugins) including dupe IUs w/ multiple versions
Modified: trunk/build/target-platform/target2targetTemplate.xsl
===================================================================
--- trunk/build/target-platform/target2targetTemplate.xsl 2012-09-06 13:46:17 UTC (rev 43470)
+++ trunk/build/target-platform/target2targetTemplate.xsl 2012-09-06 16:20:55 UTC (rev 43471)
@@ -12,14 +12,25 @@
<xsl:template match="unit">
<xsl:choose>
<xsl:when test="$replace.versions">
-<unit id="{@id}" version="${{{@id}.version}}">
+
+<xsl:variable name="prevID"><xsl:value-of select="preceding-sibling::* [1]/@id" /></xsl:variable> <!-- <prevID><xsl:value-of select="$prevID"/></prevID> -->
+<xsl:variable name="thisID"><xsl:value-of select="@id" /></xsl:variable> <!-- <thisID><xsl:value-of select="$thisID"/></thisID> -->
+<xsl:variable name="nextID"><xsl:value-of select="following-sibling::* [1]/@id" /></xsl:variable> <!-- <nextID><xsl:value-of select="$nextID"/></nextID> -->
+
+<!-- if there is more than one node matching <unit id="some.id"/> then DO NOT REPLACE the version -->
+<xsl:choose>
+ <xsl:when test="contains ($thisID, $nextID) or contains ($thisID, $prevID)">
+ <!-- <xsl:comment> Note multiple versions of this IU; cannot update automatically. </xsl:comment> -->
+ <unit id="{@id}" version="{@version}"><xsl:apply-templates/></unit>
+ </xsl:when>
+ <xsl:otherwise>
+ <unit id="{@id}" version="${{{@id}.version}}"><xsl:apply-templates/></unit>
+ </xsl:otherwise>
+</xsl:choose>
<xsl:apply-templates/>
-</unit>
</xsl:when>
<xsl:otherwise>
-<unit id="{@id}" version="{@version}">
-<xsl:apply-templates/>
-</unit>
+<unit id="{@id}" version="{@version}"><xsl:apply-templates/></unit>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
Modified: trunk/build/target-platform/targetUpdateFromRepo.xml
===================================================================
--- trunk/build/target-platform/targetUpdateFromRepo.xml 2012-09-06 13:46:17 UTC (rev 43470)
+++ trunk/build/target-platform/targetUpdateFromRepo.xml 2012-09-06 16:20:55 UTC (rev 43471)
@@ -122,8 +122,9 @@
<filterchain>
<linecontains>
<contains value="${test.pattern}" />
- <contains value="feature.group" />
+ <!-- <contains value="feature.group" /> -->
</linecontains>
+ <striplinecomments><comment value="#"/></striplinecomments>
</filterchain>
</loadfile>
<echo file="${tmpfile}">${artifactVersionsPropertiesContents}</echo>
More information about the jbosstools-commits
mailing list