servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ge...@apache.org
Subject svn commit: r654142 - /servicemix/smx3/trunk/archetypes/servicemix-archetype-catalog/src/main/resources/filter.xsl
Date Wed, 07 May 2008 15:13:25 GMT
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()">



Mime
View raw message