You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by cd...@apache.org on 2021/03/21 11:35:29 UTC

[royale-asjs] 04/17: - Finished the sanitazion of the path-elements to match the names of the Maven distribution.

This is an automated email from the ASF dual-hosted git repository.

cdutz pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit 6c73ef60782fb9fc06ab845645792765a548e33a
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Tue Mar 2 22:32:50 2021 +0100

    - Finished the sanitazion of the path-elements to match the names of the Maven distribution.
---
 distribution/src/main/xslt/process-configs.xsl | 45 +++++++++++++++-----------
 1 file changed, 27 insertions(+), 18 deletions(-)

diff --git a/distribution/src/main/xslt/process-configs.xsl b/distribution/src/main/xslt/process-configs.xsl
index c9fe13d..c1d19c7 100644
--- a/distribution/src/main/xslt/process-configs.xsl
+++ b/distribution/src/main/xslt/process-configs.xsl
@@ -66,24 +66,33 @@
     </xsl:template>
 
     <!-- The names of the Maven typedefs differ from the Ant ones, so we have to do some cleaning up here -->
-    <xsl:template match="js-external-library-path">
-        <xsl:copy>
-            <xsl:for-each select="text() | path-element">
-                <xsl:choose>
-                    <xsl:when test="name() = 'path-element'">
-                        <xsl:variable name="cleaned-typedef-element">
-                            <xsl:call-template name="cleanTypedefPathElement">
-                                <xsl:with-param name="input" select="text()"/>
-                            </xsl:call-template>
-                        </xsl:variable>
-                        <xsl:copy>../js/libs/royale-typedefs-<xsl:value-of select="$cleaned-typedef-element"/>.swc</xsl:copy>
-                    </xsl:when>
-                    <xsl:otherwise>
-                        <xsl:apply-templates select="."/>
-                    </xsl:otherwise>
-                </xsl:choose>
-            </xsl:for-each>
-        </xsl:copy>
+    <xsl:template match="path-element">
+        <xsl:choose>
+            <!-- For some reason the name of the Ant lib differs from the naming pattern of the rest -->
+            <xsl:when test="text() = 'libs/jQuery.swc'">
+                <xsl:copy>libs/JQuery.swc</xsl:copy>
+            </xsl:when>
+            <!-- For some reason the name of the Ant lib differs from the naming pattern of the rest -->
+            <xsl:when test="text() = 'js/libs/jQueryJS.swc'">
+                <xsl:copy>js/libs/JQueryJS.swc</xsl:copy>
+            </xsl:when>
+            <!-- For some reason the ace typedef entry has a version number -->
+            <xsl:when test="text() = '../js/libs/ace-1.2.3.swc'">
+                <xsl:copy>../js/libs/royale-typedefs-ace.swc</xsl:copy>
+            </xsl:when>
+            <!-- The Maven artifacts of the typedefs have significantly different names -->
+            <xsl:when test="starts-with(text(), '../js/libs/')">
+                <xsl:variable name="cleaned-typedef-element">
+                    <xsl:call-template name="cleanTypedefPathElement">
+                        <xsl:with-param name="input" select="text()"/>
+                    </xsl:call-template>
+                </xsl:variable>
+                <xsl:copy>../js/libs/royale-typedefs-<xsl:value-of select="$cleaned-typedef-element"/>.swc</xsl:copy>
+            </xsl:when>
+            <xsl:otherwise>
+                <xsl:copy-of select="."/>
+            </xsl:otherwise>
+        </xsl:choose>
     </xsl:template>
 
     <xsl:template match="@*|node()" priority="-1">