diff options
author | Paul Webster | 2013-02-21 03:11:14 +0000 |
---|---|---|
committer | Paul Webster | 2013-02-21 03:11:14 +0000 |
commit | 6ba67086b29cf8c5dcf80822f0fc55b461481146 (patch) | |
tree | 9ce4890dda03dec367c37127390feb2a43acceea /scripts | |
parent | bfdfdcc68308ff751d8311c5c5f77e78c4cdf99e (diff) | |
download | eclipse.platform.releng.aggregator-6ba67086b29cf8c5dcf80822f0fc55b461481146.tar.gz eclipse.platform.releng.aggregator-6ba67086b29cf8c5dcf80822f0fc55b461481146.tar.xz eclipse.platform.releng.aggregator-6ba67086b29cf8c5dcf80822f0fc55b461481146.zip |
Bug 397850 - [CBI] use the correct group IDs for all artifacts
run scripts through xmllint
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/xsl/fix-feature-pom.xsl | 57 | ||||
-rw-r--r-- | scripts/xsl/fix-pom.xsl | 53 |
2 files changed, 51 insertions, 59 deletions
diff --git a/scripts/xsl/fix-feature-pom.xsl b/scripts/xsl/fix-feature-pom.xsl index 4d28934fd..2b8dcb1a9 100644 --- a/scripts/xsl/fix-feature-pom.xsl +++ b/scripts/xsl/fix-feature-pom.xsl @@ -1,42 +1,39 @@ <?xml version="1.0"?> -<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" -xmlns:xs="http://www.w3.org/2001/XMLSchema" -xmlns:my="http://maven.apache.org/POM/4.0.0" -exclude-result-prefixes="my xs" -version="2.0"> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:my="http://maven.apache.org/POM/4.0.0" exclude-result-prefixes="my xs" version="2.0"> <!--xsl:output omit-xml-declaration="yes" indent="yes"/> <xsl:output indent="yes"/> <xsl:strip-space elements="*"/--> -<xsl:output method="xml" - encoding="UTF-8"/> - -<xsl:template name="group-id"> - <xsl:param name="pText" select="."/> - <xsl:param name="pCount" select="0"/> - <xsl:if test="$pCount < 3"> - <xsl:value-of select="substring-before(concat($pText, '.'), '.')"/> - <xsl:if test="$pCount < 2"><xsl:text>.</xsl:text></xsl:if> - <xsl:call-template name="group-id"> - <xsl:with-param name="pText" select="substring-after($pText, '.')"/> - <xsl:with-param name="pCount" select="$pCount + 1"/> - </xsl:call-template> - </xsl:if> - <xsl:if test="$pCount = 3"><xsl:text>.feature</xsl:text></xsl:if> -</xsl:template> - -<xsl:template match="/my:project/my:groupId"> - <groupId xmlns="http://maven.apache.org/POM/4.0.0"><xsl:call-template name="group-id"> -<xsl:with-param name="pText" select="/my:project/my:artifactId/text()"/> -<xsl:with-param name="pCount" select="0"/> -</xsl:call-template></groupId> -</xsl:template> - + <xsl:output method="xml" encoding="UTF-8"/> + <xsl:template name="group-id"> + <xsl:param name="pText" select="."/> + <xsl:param name="pCount" select="0"/> + <xsl:if test="$pCount < 3"> + <xsl:value-of select="substring-before(concat($pText, '.'), '.')"/> + <xsl:if test="$pCount < 2"> + <xsl:text>.</xsl:text> + </xsl:if> + <xsl:call-template name="group-id"> + <xsl:with-param name="pText" select="substring-after($pText, '.')"/> + <xsl:with-param name="pCount" select="$pCount + 1"/> + </xsl:call-template> + </xsl:if> + <xsl:if test="$pCount = 3"> + <xsl:text>.feature</xsl:text> + </xsl:if> + </xsl:template> + <xsl:template match="/my:project/my:groupId"> + <groupId xmlns="http://maven.apache.org/POM/4.0.0"> + <xsl:call-template name="group-id"> + <xsl:with-param name="pText" select="/my:project/my:artifactId/text()"/> + <xsl:with-param name="pCount" select="0"/> + </xsl:call-template> + </groupId> + </xsl:template> <xsl:template match="@*|node()"> <xsl:copy> <xsl:apply-templates select="@*|node()"/> </xsl:copy> </xsl:template> - <!--xsl:template match="node()|@*"> <xsl:copy> <xsl:apply-templates select="node()|@*"> diff --git a/scripts/xsl/fix-pom.xsl b/scripts/xsl/fix-pom.xsl index e065d49b0..ed1f0ed4b 100644 --- a/scripts/xsl/fix-pom.xsl +++ b/scripts/xsl/fix-pom.xsl @@ -1,41 +1,36 @@ <?xml version="1.0"?> -<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" -xmlns:xs="http://www.w3.org/2001/XMLSchema" -xmlns:my="http://maven.apache.org/POM/4.0.0" -exclude-result-prefixes="my xs" -version="2.0"> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:my="http://maven.apache.org/POM/4.0.0" exclude-result-prefixes="my xs" version="2.0"> <!--xsl:output omit-xml-declaration="yes" indent="yes"/> <xsl:output indent="yes"/> <xsl:strip-space elements="*"/--> -<xsl:output method="xml" - encoding="UTF-8"/> - -<xsl:template name="group-id"> - <xsl:param name="pText" select="."/> - <xsl:param name="pCount" select="0"/> - <xsl:if test="$pCount < 3"> - <xsl:value-of select="substring-before(concat($pText, '.'), '.')"/> - <xsl:if test="$pCount < 2"><xsl:text>.</xsl:text></xsl:if> - <xsl:call-template name="group-id"> - <xsl:with-param name="pText" select="substring-after($pText, '.')"/> - <xsl:with-param name="pCount" select="$pCount + 1"/> - </xsl:call-template> - </xsl:if> -</xsl:template> - -<xsl:template match="/my:project/my:groupId"> - <groupId xmlns="http://maven.apache.org/POM/4.0.0"><xsl:call-template name="group-id"> -<xsl:with-param name="pText" select="/my:project/my:artifactId/text()"/> -<xsl:with-param name="pCount" select="0"/> -</xsl:call-template></groupId> -</xsl:template> - + <xsl:output method="xml" encoding="UTF-8"/> + <xsl:template name="group-id"> + <xsl:param name="pText" select="."/> + <xsl:param name="pCount" select="0"/> + <xsl:if test="$pCount < 3"> + <xsl:value-of select="substring-before(concat($pText, '.'), '.')"/> + <xsl:if test="$pCount < 2"> + <xsl:text>.</xsl:text> + </xsl:if> + <xsl:call-template name="group-id"> + <xsl:with-param name="pText" select="substring-after($pText, '.')"/> + <xsl:with-param name="pCount" select="$pCount + 1"/> + </xsl:call-template> + </xsl:if> + </xsl:template> + <xsl:template match="/my:project/my:groupId"> + <groupId xmlns="http://maven.apache.org/POM/4.0.0"> + <xsl:call-template name="group-id"> + <xsl:with-param name="pText" select="/my:project/my:artifactId/text()"/> + <xsl:with-param name="pCount" select="0"/> + </xsl:call-template> + </groupId> + </xsl:template> <xsl:template match="@*|node()"> <xsl:copy> <xsl:apply-templates select="@*|node()"/> </xsl:copy> </xsl:template> - <!--xsl:template match="node()|@*"> <xsl:copy> <xsl:apply-templates select="node()|@*"> |