You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by ge...@apache.org on 2008/05/07 17:13:25 UTC
svn commit: r654142 -
/servicemix/smx3/trunk/archetypes/servicemix-archetype-catalog/src/main/resources/filter.xsl
Author: gertv
Date: Wed May 7 08:13:24 2008
New Revision: 654142
URL: http://svn.apache.org/viewvc?rev=654142&view=rev
Log:
SM-1277: Avoiding duplicate entries in archetype catalog
Modified:
servicemix/smx3/trunk/archetypes/servicemix-archetype-catalog/src/main/resources/filter.xsl
Modified: servicemix/smx3/trunk/archetypes/servicemix-archetype-catalog/src/main/resources/filter.xsl
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/archetypes/servicemix-archetype-catalog/src/main/resources/filter.xsl?rev=654142&r1=654141&r2=654142&view=diff
==============================================================================
--- servicemix/smx3/trunk/archetypes/servicemix-archetype-catalog/src/main/resources/filter.xsl (original)
+++ servicemix/smx3/trunk/archetypes/servicemix-archetype-catalog/src/main/resources/filter.xsl Wed May 7 08:13:24 2008
@@ -20,10 +20,20 @@
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
+ <xsl:strip-space elements="*"/>
<xsl:param name="version"/>
- <xsl:template match="archetype[version != '@{servicemix-version}']">
+ <xsl:template match="archetype[version != '@{servicemix-version}'] | archetype[concat(artifactId,version) = concat(preceding-sibling::archetype/artifactId,preceding-sibling::archetype/version)]">
<!-- simply drop archetypes for other versions of ServiceMix -->
+ <!-- and also drop any duplicate archetype definitions (e.g. with snapshot builds) -->
+ </xsl:template>
+
+ <xsl:template match="archetypes">
+ <archetypes>
+ <xsl:apply-templates select="archetype">
+ <xsl:sort select="artifactId"/>
+ </xsl:apply-templates>
+ </archetypes>
</xsl:template>
<xsl:template match="@*|node()">