Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/releng
diff options
context:
space:
mode:
authorMarkus Knauer2012-09-26 06:17:56 -0400
committerMarkus Knauer2012-09-26 06:17:56 -0400
commita302490a4ac1f7399df8670e598e51e2aab525c9 (patch)
treee1a37e21bd46a5899122c47afe393a30fc1e5139 /releng
parentb7ac69edb71a6695a531d7a0c06969d9c5879022 (diff)
downloadorg.eclipse.rap-a302490a4ac1f7399df8670e598e51e2aab525c9.tar.gz
org.eclipse.rap-a302490a4ac1f7399df8670e598e51e2aab525c9.tar.xz
org.eclipse.rap-a302490a4ac1f7399df8670e598e51e2aab525c9.zip
Provide initial XSL script that adds p2 stats to the artifact
382874: Add download stats and mirrors URL to p2 metadata https://bugs.eclipse.org/bugs/show_bug.cgi?id=382874
Diffstat (limited to 'releng')
-rw-r--r--releng/org.eclipse.rap.releng/scripts/addDownloadStats.xsl77
1 files changed, 77 insertions, 0 deletions
diff --git a/releng/org.eclipse.rap.releng/scripts/addDownloadStats.xsl b/releng/org.eclipse.rap.releng/scripts/addDownloadStats.xsl
new file mode 100644
index 0000000000..ad0a7ef7c6
--- /dev/null
+++ b/releng/org.eclipse.rap.releng/scripts/addDownloadStats.xsl
@@ -0,0 +1,77 @@
+<!--
+Copyright (c) 2010 Mia-Software
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+Gregoire Dupe
+-->
+<xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
+ version="1.0">
+ <xsl:output encoding="UTF-8" method="xml" indent="yes" />
+ <xsl:strip-space elements="*" />
+
+ <xsl:template match="/">
+ <xsl:processing-instruction name="artifactRepository">version='1.1.0'</xsl:processing-instruction>
+
+ <xsl:apply-templates />
+ </xsl:template>
+
+ <xsl:template match="repository/properties">
+ <properties size='{@size+1}'>
+ <xsl:copy-of select="property" />
+ <property name='p2.statsURI' value='http://download.eclipse.org/stats/rt/rap' />
+ </properties>
+ </xsl:template>
+
+ <xsl:template match="artifact[@classifier='osgi.bundle' and @id='org.eclipse.rap.rwt']/properties">
+ <xsl:call-template name="artifact_properties"/>
+ </xsl:template>
+
+ <xsl:template match="artifact[@classifier='osgi.bundle' and @id='org.eclipse.rap.rwt.osgi']/properties">
+ <xsl:call-template name="artifact_properties"/>
+ </xsl:template>
+
+ <xsl:template match="artifact[@classifier='osgi.bundle' and @id='org.eclipse.rap.ui']/properties">
+ <xsl:call-template name="artifact_properties"/>
+ </xsl:template>
+
+ <xsl:template name="artifact_properties">
+ <properties size='{@size+1}'>
+ <xsl:copy-of select="property" />
+ <property name='download.stats' value='{../@id}.bundle-{../@version}' />
+ </properties>
+ </xsl:template>
+
+
+ <xsl:template match="artifact[@classifier='org.eclipse.update.feature' and @id='org.eclipse.rap.feature']/properties">
+ <xsl:call-template name="artifact_properties_feature"/>
+ </xsl:template>
+
+ <xsl:template match="artifact[@classifier='org.eclipse.update.feature' and @id='org.eclipse.rap.equinox.target.feature']/properties">
+ <xsl:call-template name="artifact_properties_feature"/>
+ </xsl:template>
+
+ <xsl:template match="artifact[@classifier='org.eclipse.update.feature' and @id='org.eclipse.rap.tools.feature']/properties">
+ <xsl:call-template name="artifact_properties_feature"/>
+ </xsl:template>
+
+ <xsl:template name="artifact_properties_feature">
+ <properties size='{@size+1}'>
+ <xsl:copy-of select="property" />
+ <property name='download.stats' value='{../@id}-{../@version}' />
+ </properties>
+ </xsl:template>
+
+ <xsl:template match="*">
+ <xsl:copy>
+ <xsl:for-each select="@*">
+ <xsl:copy-of select="." />
+ </xsl:for-each>
+ <xsl:apply-templates />
+ </xsl:copy>
+ </xsl:template>
+
+</xsl:stylesheet>

Back to the top