You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by cd...@apache.org on 2016/06/07 11:26:33 UTC

git commit: [flex-falcon] [refs/heads/develop] - - updated the maven plugin to use a set of uri names to output the 'include-namespaces' (Getting rid of duplicates)

Repository: flex-falcon
Updated Branches:
  refs/heads/develop 53bb66c83 -> 18fc1fe6f


- updated the maven plugin to use a set of uri names to output the 'include-namespaces' (Getting rid of duplicates)


Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/18fc1fe6
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/18fc1fe6
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/18fc1fe6

Branch: refs/heads/develop
Commit: 18fc1fe6f2f9cb20a37d927656dbc97632fa1a87
Parents: 53bb66c
Author: Christofer Dutz <ch...@codecentric.de>
Authored: Tue Jun 7 13:23:57 2016 +0200
Committer: Christofer Dutz <ch...@codecentric.de>
Committed: Tue Jun 7 13:23:57 2016 +0200

----------------------------------------------------------------------
 .../main/java/org/apache/flex/maven/flexjs/BaseMojo.java    | 9 +++++++++
 .../src/main/resources/config/compile-as-config.xml         | 4 ++--
 .../src/main/resources/config/compile-extern-config.xml     | 4 ++--
 .../src/main/resources/config/compile-js-config.xml         | 4 ++--
 4 files changed, 15 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/18fc1fe6/flexjs-maven-plugin/src/main/java/org/apache/flex/maven/flexjs/BaseMojo.java
----------------------------------------------------------------------
diff --git a/flexjs-maven-plugin/src/main/java/org/apache/flex/maven/flexjs/BaseMojo.java b/flexjs-maven-plugin/src/main/java/org/apache/flex/maven/flexjs/BaseMojo.java
index c0b4e7f..63e78ab 100644
--- a/flexjs-maven-plugin/src/main/java/org/apache/flex/maven/flexjs/BaseMojo.java
+++ b/flexjs-maven-plugin/src/main/java/org/apache/flex/maven/flexjs/BaseMojo.java
@@ -79,6 +79,7 @@ public abstract class BaseMojo
         context.put("externalLibraries", externalLibraries);
         context.put("sourcePaths", sourcePaths);
         context.put("namespaces", getNamespaces());
+        context.put("namespaceUris", getNamespaceUris());
         context.put("includeClasses", includeClasses);
         context.put("includeFiles", includeFiles);
         context.put("targetPlayer", targetPlayer);
@@ -97,6 +98,14 @@ public abstract class BaseMojo
         return namespaces;
     }
 
+    protected Set<String> getNamespaceUris() {
+        Set<String> namespaceUris = new HashSet<String>();
+        for(Namespace namespace : namespaces) {
+            namespaceUris.add(namespace.getUri());
+        }
+        return namespaceUris;
+    }
+
     @SuppressWarnings("unchecked")
     protected List<String> getSourcePaths() {
         List<String> sourcePaths = new LinkedList<String>();

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/18fc1fe6/flexjs-maven-plugin/src/main/resources/config/compile-as-config.xml
----------------------------------------------------------------------
diff --git a/flexjs-maven-plugin/src/main/resources/config/compile-as-config.xml b/flexjs-maven-plugin/src/main/resources/config/compile-as-config.xml
index 6eafabe..1c9e1e2 100644
--- a/flexjs-maven-plugin/src/main/resources/config/compile-as-config.xml
+++ b/flexjs-maven-plugin/src/main/resources/config/compile-as-config.xml
@@ -91,9 +91,9 @@
     </include-classes>
 #end
 
-#if($namespaces)
+#if($namespaceUris)
     <include-namespaces>
-#foreach($namespace in $namespaces)        <uri>$namespace.uri</uri>
+#foreach($namespaceUri in $namespaceUris)        <uri>$namespaceUri</uri>
 #end
     </include-namespaces>
 #end

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/18fc1fe6/flexjs-maven-plugin/src/main/resources/config/compile-extern-config.xml
----------------------------------------------------------------------
diff --git a/flexjs-maven-plugin/src/main/resources/config/compile-extern-config.xml b/flexjs-maven-plugin/src/main/resources/config/compile-extern-config.xml
index 7829eb4..ad2a205 100644
--- a/flexjs-maven-plugin/src/main/resources/config/compile-extern-config.xml
+++ b/flexjs-maven-plugin/src/main/resources/config/compile-extern-config.xml
@@ -73,9 +73,9 @@
     </include-classes>
 #end
 
-#if($namespaces)
+#if($namespaceUris)
     <include-namespaces>
-#foreach($namespace in $namespaces)        <uri>$namespace.uri</uri>
+#foreach($namespaceUri in $namespaceUris)        <uri>$namespaceUri</uri>
 #end
     </include-namespaces>
 #end

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/18fc1fe6/flexjs-maven-plugin/src/main/resources/config/compile-js-config.xml
----------------------------------------------------------------------
diff --git a/flexjs-maven-plugin/src/main/resources/config/compile-js-config.xml b/flexjs-maven-plugin/src/main/resources/config/compile-js-config.xml
index 08a95e6..9e487e8 100644
--- a/flexjs-maven-plugin/src/main/resources/config/compile-js-config.xml
+++ b/flexjs-maven-plugin/src/main/resources/config/compile-js-config.xml
@@ -89,9 +89,9 @@
     </include-classes>
 #end
 
-#if($namespaces)
+#if($namespaceUris)
     <include-namespaces>
-#foreach($namespace in $namespaces)        <uri>$namespace.uri</uri>
+#foreach($namespaceUri in $namespaceUris)        <uri>$namespaceUri</uri>
 #end
     </include-namespaces>
 #end