flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cd...@apache.org
Subject git commit: [flex-falcon] [refs/heads/feature/maven-migration] - - Created a new lifecycle-binding for "swc" (packaging type "swc") which uses the flexjs-maven-plugin to implement a working lifecycle. - Changed the extern modules to use this new packagin
Date Tue, 29 Mar 2016 13:00:58 GMT
Repository: flex-falcon
Updated Branches:
  refs/heads/feature/maven-migration 56a5876d4 -> 9620315b6


- Created a new lifecycle-binding for "swc" (packaging type "swc") which uses the flexjs-maven-plugin
to implement a working lifecycle.
- Changed the extern modules to use this new packaging type
- Fixed a glitch in the migration script, which didn't convert the GCL project after it had
be converted earlier


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

Branch: refs/heads/feature/maven-migration
Commit: 9620315b6160f433f3c5ce9e71c216965da6d1b7
Parents: 56a5876
Author: Christofer Dutz <christofer.dutz@codecentric.de>
Authored: Tue Mar 29 15:00:51 2016 +0200
Committer: Christofer Dutz <christofer.dutz@codecentric.de>
Committed: Tue Mar 29 15:00:51 2016 +0200

----------------------------------------------------------------------
 .../externs/goog/net/crossdomainrpc_test.gif    |  0
 externs/GCL/pom.xml                             | 13 +----
 externs/cordova/pom.xml                         | 20 +------
 externs/createjs/pom.xml                        | 20 +------
 externs/google_maps/pom.xml                     | 20 +------
 externs/jasmine/pom.xml                         | 20 +------
 externs/jquery/pom.xml                          | 20 +------
 externs/js/pom.xml                              | 13 +----
 externs/node/pom.xml                            | 20 +------
 .../apache/flex/maven/flexjs/CompileMojo.java   |  7 +++
 .../apache/flex/maven/flexjs/ExterncMojo.java   |  6 ++
 .../resources/META-INF/plexus/components.xml    | 61 ++++++++++++++++++++
 migrate-to-maven.sh                             |  1 +
 pom.xml                                         |  2 +
 14 files changed, 100 insertions(+), 123 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/9620315b/externs/GCL/externs/goog/net/crossdomainrpc_test.gif
----------------------------------------------------------------------
diff --git a/externs/GCL/externs/goog/net/crossdomainrpc_test.gif b/externs/GCL/externs/goog/net/crossdomainrpc_test.gif
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/9620315b/externs/GCL/pom.xml
----------------------------------------------------------------------
diff --git a/externs/GCL/pom.xml b/externs/GCL/pom.xml
index 00cd301..e38b848 100644
--- a/externs/GCL/pom.xml
+++ b/externs/GCL/pom.xml
@@ -29,7 +29,7 @@
 
     <artifactId>flex-compiler-externs-gcl</artifactId>
     <version>0.6.0-SNAPSHOT</version>
-    <packaging>jar</packaging>
+    <packaging>swc</packaging>
 
     <name>Apache Flex - FlexJS Compiler: Externs: GCL</name>
 
@@ -39,15 +39,7 @@
                 <groupId>org.apache.flex.flexjs.compiler</groupId>
                 <artifactId>flexjs-maven-plugin</artifactId>
                 <version>0.6.0-SNAPSHOT</version>
-                <executions>
-                    <execution>
-                        <id>compile</id>
-                        <phase>compile</phase>
-                        <goals>
-                            <goal>compile</goal>
-                        </goals>
-                    </execution>
-                </executions>
+                <extensions>true</extensions>
                 <dependencies>
                     <dependency>
                         <groupId>org.apache.flex.flexjs.compiler</groupId>
@@ -64,6 +56,7 @@
             <groupId>org.apache.flex.flexjs.compiler</groupId>
             <artifactId>flex-compiler-externs-js</artifactId>
             <version>0.6.0-SNAPSHOT</version>
+            <type>swc</type>
         </dependency-->
     </dependencies>
 

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/9620315b/externs/cordova/pom.xml
----------------------------------------------------------------------
diff --git a/externs/cordova/pom.xml b/externs/cordova/pom.xml
index 5b0120e..69bb6b4 100644
--- a/externs/cordova/pom.xml
+++ b/externs/cordova/pom.xml
@@ -29,7 +29,7 @@
 
     <artifactId>flex-compiler-externs-cordova</artifactId>
     <version>0.6.0-SNAPSHOT</version>
-    <packaging>jar</packaging>
+    <packaging>swc</packaging>
 
     <name>Apache Flex - FlexJS Compiler: Externs: Cordova</name>
 
@@ -43,22 +43,7 @@
                 <groupId>org.apache.flex.flexjs.compiler</groupId>
                 <artifactId>flexjs-maven-plugin</artifactId>
                 <version>0.6.0-SNAPSHOT</version>
-                <executions>
-                    <execution>
-                        <id>generate</id>
-                        <phase>generate-sources</phase>
-                        <goals>
-                            <goal>generate</goal>
-                        </goals>
-                    </execution>
-                    <execution>
-                        <id>compile</id>
-                        <phase>compile</phase>
-                        <goals>
-                            <goal>compile</goal>
-                        </goals>
-                    </execution>
-                </executions>
+                <extensions>true</extensions>
                 <dependencies>
                     <dependency>
                         <groupId>org.apache.flex.flexjs.compiler</groupId>
@@ -75,6 +60,7 @@
             <groupId>org.apache.flex.flexjs.compiler</groupId>
             <artifactId>flex-compiler-externs-js</artifactId>
             <version>0.6.0-SNAPSHOT</version>
+            <type>swc</type>
         </dependency>
     </dependencies>
 

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/9620315b/externs/createjs/pom.xml
----------------------------------------------------------------------
diff --git a/externs/createjs/pom.xml b/externs/createjs/pom.xml
index 2a5c8d1..33028e9 100644
--- a/externs/createjs/pom.xml
+++ b/externs/createjs/pom.xml
@@ -29,7 +29,7 @@
 
     <artifactId>flex-compiler-externs-createjs</artifactId>
     <version>0.6.0-SNAPSHOT</version>
-    <packaging>jar</packaging>
+    <packaging>swc</packaging>
 
     <name>Apache Flex - FlexJS Compiler: Externs: CreateJS</name>
 
@@ -172,22 +172,7 @@
                 <groupId>org.apache.flex.flexjs.compiler</groupId>
                 <artifactId>flexjs-maven-plugin</artifactId>
                 <version>0.6.0-SNAPSHOT</version>
-                <executions>
-                    <execution>
-                        <id>generate</id>
-                        <phase>generate-sources</phase>
-                        <goals>
-                            <goal>generate</goal>
-                        </goals>
-                    </execution>
-                    <execution>
-                        <id>compile</id>
-                        <phase>compile</phase>
-                        <goals>
-                            <goal>compile</goal>
-                        </goals>
-                    </execution>
-                </executions>
+                <extensions>true</extensions>
                 <dependencies>
                     <dependency>
                         <groupId>org.apache.flex.flexjs.compiler</groupId>
@@ -204,6 +189,7 @@
             <groupId>org.apache.flex.flexjs.compiler</groupId>
             <artifactId>flex-compiler-externs-js</artifactId>
             <version>0.6.0-SNAPSHOT</version>
+            <type>swc</type>
         </dependency>
     </dependencies>
 

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/9620315b/externs/google_maps/pom.xml
----------------------------------------------------------------------
diff --git a/externs/google_maps/pom.xml b/externs/google_maps/pom.xml
index 439fa04..4dea139 100644
--- a/externs/google_maps/pom.xml
+++ b/externs/google_maps/pom.xml
@@ -29,7 +29,7 @@
 
     <artifactId>flex-compiler-externs-goolemaps</artifactId>
     <version>0.6.0-SNAPSHOT</version>
-    <packaging>jar</packaging>
+    <packaging>swc</packaging>
 
     <name>Apache Flex - FlexJS Compiler: Externs: GoogleMaps</name>
 
@@ -91,22 +91,7 @@ google.maps = {};]]></replace></replace-regexp-operation>
                 <groupId>org.apache.flex.flexjs.compiler</groupId>
                 <artifactId>flexjs-maven-plugin</artifactId>
                 <version>0.6.0-SNAPSHOT</version>
-                <executions>
-                    <execution>
-                        <id>generate</id>
-                        <phase>generate-sources</phase>
-                        <goals>
-                            <goal>generate</goal>
-                        </goals>
-                    </execution>
-                    <execution>
-                        <id>compile</id>
-                        <phase>compile</phase>
-                        <goals>
-                            <goal>compile</goal>
-                        </goals>
-                    </execution>
-                </executions>
+                <extensions>true</extensions>
                 <dependencies>
                     <dependency>
                         <groupId>org.apache.flex.flexjs.compiler</groupId>
@@ -123,6 +108,7 @@ google.maps = {};]]></replace></replace-regexp-operation>
             <groupId>org.apache.flex.flexjs.compiler</groupId>
             <artifactId>flex-compiler-externs-js</artifactId>
             <version>0.6.0-SNAPSHOT</version>
+            <type>swc</type>
         </dependency>
     </dependencies>
 

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/9620315b/externs/jasmine/pom.xml
----------------------------------------------------------------------
diff --git a/externs/jasmine/pom.xml b/externs/jasmine/pom.xml
index 6dc81bc..47e6a24 100644
--- a/externs/jasmine/pom.xml
+++ b/externs/jasmine/pom.xml
@@ -29,7 +29,7 @@
 
     <artifactId>flex-compiler-externs-jasmine</artifactId>
     <version>0.6.0-SNAPSHOT</version>
-    <packaging>jar</packaging>
+    <packaging>swc</packaging>
 
     <name>Apache Flex - FlexJS Compiler: Externs: Jasmine</name>
 
@@ -63,22 +63,7 @@
                 <groupId>org.apache.flex.flexjs.compiler</groupId>
                 <artifactId>flexjs-maven-plugin</artifactId>
                 <version>0.6.0-SNAPSHOT</version>
-                <executions>
-                    <execution>
-                        <id>generate</id>
-                        <phase>generate-sources</phase>
-                        <goals>
-                            <goal>generate</goal>
-                        </goals>
-                    </execution>
-                    <execution>
-                        <id>compile</id>
-                        <phase>compile</phase>
-                        <goals>
-                            <goal>compile</goal>
-                        </goals>
-                    </execution>
-                </executions>
+                <extensions>true</extensions>
                 <dependencies>
                     <dependency>
                         <groupId>org.apache.flex.flexjs.compiler</groupId>
@@ -95,6 +80,7 @@
             <groupId>org.apache.flex.flexjs.compiler</groupId>
             <artifactId>flex-compiler-externs-js</artifactId>
             <version>0.6.0-SNAPSHOT</version>
+            <type>swc</type>
         </dependency>
     </dependencies>
 

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/9620315b/externs/jquery/pom.xml
----------------------------------------------------------------------
diff --git a/externs/jquery/pom.xml b/externs/jquery/pom.xml
index 2a29e15..02f3861 100644
--- a/externs/jquery/pom.xml
+++ b/externs/jquery/pom.xml
@@ -29,7 +29,7 @@
 
     <artifactId>flex-compiler-externs-jquery</artifactId>
     <version>0.6.0-SNAPSHOT</version>
-    <packaging>jar</packaging>
+    <packaging>swc</packaging>
 
     <name>Apache Flex - FlexJS Compiler: Externs: JQuery</name>
 
@@ -63,22 +63,7 @@
                 <groupId>org.apache.flex.flexjs.compiler</groupId>
                 <artifactId>flexjs-maven-plugin</artifactId>
                 <version>0.6.0-SNAPSHOT</version>
-                <executions>
-                    <execution>
-                        <id>generate</id>
-                        <phase>generate-sources</phase>
-                        <goals>
-                            <goal>generate</goal>
-                        </goals>
-                    </execution>
-                    <execution>
-                        <id>compile</id>
-                        <phase>compile</phase>
-                        <goals>
-                            <goal>compile</goal>
-                        </goals>
-                    </execution>
-                </executions>
+                <extensions>true</extensions>
                 <dependencies>
                     <dependency>
                         <groupId>org.apache.flex.flexjs.compiler</groupId>
@@ -95,6 +80,7 @@
             <groupId>org.apache.flex.flexjs.compiler</groupId>
             <artifactId>flex-compiler-externs-js</artifactId>
             <version>0.6.0-SNAPSHOT</version>
+            <type>swc</type>
         </dependency>
     </dependencies>
 

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/9620315b/externs/js/pom.xml
----------------------------------------------------------------------
diff --git a/externs/js/pom.xml b/externs/js/pom.xml
index 341973f..7ad466e 100644
--- a/externs/js/pom.xml
+++ b/externs/js/pom.xml
@@ -29,7 +29,7 @@
 
     <artifactId>flex-compiler-externs-js</artifactId>
     <version>0.6.0-SNAPSHOT</version>
-    <packaging>jar</packaging>
+    <packaging>swc</packaging>
 
     <name>Apache Flex - FlexJS Compiler: Externs: JS</name>
 
@@ -121,16 +121,7 @@
                 <groupId>org.apache.flex.flexjs.compiler</groupId>
                 <artifactId>flexjs-maven-plugin</artifactId>
                 <version>0.6.0-SNAPSHOT</version>
-                <!-- Generate the ActionScript interface -->
-                <executions>
-                    <execution>
-                        <id>generate</id>
-                        <phase>generate-sources</phase>
-                        <goals>
-                            <goal>generate</goal>
-                        </goals>
-                    </execution>
-                </executions>
+                <extensions>true</extensions>
                 <dependencies>
                     <dependency>
                         <groupId>org.apache.flex.flexjs.compiler</groupId>

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/9620315b/externs/node/pom.xml
----------------------------------------------------------------------
diff --git a/externs/node/pom.xml b/externs/node/pom.xml
index cfa7d76..32e215a 100644
--- a/externs/node/pom.xml
+++ b/externs/node/pom.xml
@@ -29,7 +29,7 @@
 
     <artifactId>flex-compiler-externs-node</artifactId>
     <version>0.6.0-SNAPSHOT</version>
-    <packaging>jar</packaging>
+    <packaging>swc</packaging>
 
     <name>Apache Flex - FlexJS Compiler: Externs: Node</name>
 
@@ -39,22 +39,7 @@
                 <groupId>org.apache.flex.flexjs.compiler</groupId>
                 <artifactId>flexjs-maven-plugin</artifactId>
                 <version>0.6.0-SNAPSHOT</version>
-                <executions>
-                    <execution>
-                        <id>generate</id>
-                        <phase>generate-sources</phase>
-                        <goals>
-                            <goal>generate</goal>
-                        </goals>
-                    </execution>
-                    <execution>
-                        <id>compile</id>
-                        <phase>compile</phase>
-                        <goals>
-                            <goal>compile</goal>
-                        </goals>
-                    </execution>
-                </executions>
+                <extensions>true</extensions>
                 <dependencies>
                     <dependency>
                         <groupId>org.apache.flex.flexjs.compiler</groupId>
@@ -71,6 +56,7 @@
             <groupId>org.apache.flex.flexjs.compiler</groupId>
             <artifactId>flex-compiler-externs-js</artifactId>
             <version>0.6.0-SNAPSHOT</version>
+            <type>swc</type>
         </dependency>
     </dependencies>
 

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/9620315b/flexjs-maven-plugin/src/main/java/org/apache/flex/maven/flexjs/CompileMojo.java
----------------------------------------------------------------------
diff --git a/flexjs-maven-plugin/src/main/java/org/apache/flex/maven/flexjs/CompileMojo.java
b/flexjs-maven-plugin/src/main/java/org/apache/flex/maven/flexjs/CompileMojo.java
index 9c34a51..9b17af8 100644
--- a/flexjs-maven-plugin/src/main/java/org/apache/flex/maven/flexjs/CompileMojo.java
+++ b/flexjs-maven-plugin/src/main/java/org/apache/flex/maven/flexjs/CompileMojo.java
@@ -24,6 +24,7 @@ import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugins.annotations.LifecyclePhase;
 import org.apache.maven.plugins.annotations.Mojo;
 import org.apache.maven.plugins.annotations.Parameter;
+import org.apache.maven.project.MavenProject;
 
 import java.io.File;
 
@@ -35,6 +36,9 @@ public class CompileMojo
     extends AbstractMojo
 {
 
+    @Parameter(defaultValue = "${project}", readonly = true)
+    public MavenProject project;
+
     @Parameter(defaultValue="${basedir}/src/main/config/compile-config.xml")
     private File configFile;
 
@@ -54,6 +58,9 @@ public class CompileMojo
         String[] args = {"+flexlib=externs", "-debug", "-load-config=" + configFile.getPath(),
                 "-output=" + outputFile.getPath()};
         compc.execute(args);
+
+        // Attach the file created by the compiler as artifact file to maven.
+        project.getArtifact().setFile(outputFile);
     }
 
 }

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/9620315b/flexjs-maven-plugin/src/main/java/org/apache/flex/maven/flexjs/ExterncMojo.java
----------------------------------------------------------------------
diff --git a/flexjs-maven-plugin/src/main/java/org/apache/flex/maven/flexjs/ExterncMojo.java
b/flexjs-maven-plugin/src/main/java/org/apache/flex/maven/flexjs/ExterncMojo.java
index 5511304..063edc2 100644
--- a/flexjs-maven-plugin/src/main/java/org/apache/flex/maven/flexjs/ExterncMojo.java
+++ b/flexjs-maven-plugin/src/main/java/org/apache/flex/maven/flexjs/ExterncMojo.java
@@ -41,6 +41,12 @@ public class ExterncMojo
     public void execute()
         throws MojoExecutionException
     {
+        if(!configFile.exists()) {
+            getLog().info("Skipping Generation of ActionScript code due to missing config
file: " +
+                    configFile.getPath());
+            return;
+        }
+        
         FlexToolRegistry toolRegistry = new FlexToolRegistry();
         FlexToolGroup toolGroup = toolRegistry.getToolGroup("FlexJS");
         // TODO: Change this to a flex-tool-api constant ...

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/9620315b/flexjs-maven-plugin/src/main/resources/META-INF/plexus/components.xml
----------------------------------------------------------------------
diff --git a/flexjs-maven-plugin/src/main/resources/META-INF/plexus/components.xml b/flexjs-maven-plugin/src/main/resources/META-INF/plexus/components.xml
new file mode 100644
index 0000000..a147013
--- /dev/null
+++ b/flexjs-maven-plugin/src/main/resources/META-INF/plexus/components.xml
@@ -0,0 +1,61 @@
+<?xml version="1.0"?>
+<component-set>
+    <components>
+        <component>
+            <role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role>
+            <role-hint>swc</role-hint>
+            <implementation>
+                org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping
+            </implementation>
+            <configuration>
+                <lifecycles>
+                    <lifecycle>
+                        <id>default</id>
+                        <phases>
+                            <generate-sources>
+                                org.apache.flex.flexjs.compiler:flexjs-maven-plugin:generate
+                            </generate-sources>
+                            <process-resources>
+                                org.apache.maven.plugins:maven-resources-plugin:resources
+                            </process-resources>
+                            <compile>
+                                org.apache.flex.flexjs.compiler:flexjs-maven-plugin:compile
+                            </compile>
+                            <process-test-resources>
+                                org.apache.maven.plugins:maven-resources-plugin:testResources
+                            </process-test-resources>
+                            <!--test-compile>
+                                org.apache.flex.flexjs.compiler:flexjs-maven-plugin:testCompile
+                            </test-compile-->
+                            <!--test>
+                                org.apache.maven.plugins:maven-surefire-plugin:test
+                            </test-->
+                            <!--package>
+                                org.apache.flex.flexjs.compiler:flexjs-maven-plugin:package
+                            </package-->
+                            <install>
+                                org.apache.maven.plugins:maven-install-plugin:install
+                            </install>
+                            <deploy>
+                                org.apache.maven.plugins:maven-deploy-plugin:deploy
+                            </deploy>
+                        </phases>
+                    </lifecycle>
+                </lifecycles>
+            </configuration>
+        </component>
+        <component>
+            <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
+            <role-hint>swc</role-hint>
+            <implementation>
+                org.apache.maven.artifact.handler.DefaultArtifactHandler
+            </implementation>
+            <configuration>
+                <type>swc</type>
+                <extension>swc</extension>
+                <language>flex</language>
+                <addedToClasspath>true</addedToClasspath>
+            </configuration>
+        </component>
+    </components>
+</component-set>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/9620315b/migrate-to-maven.sh
----------------------------------------------------------------------
diff --git a/migrate-to-maven.sh b/migrate-to-maven.sh
index 8a440b2..9dd4cff 100755
--- a/migrate-to-maven.sh
+++ b/migrate-to-maven.sh
@@ -9,6 +9,7 @@ rm -rf compiler/src/test
 rm -rf compiler.jx/src/main
 rm -rf compiler.jx/src/test
 rm -rf flex-compiler-oem/src/main
+rm -rf externs/GCL/src/main/flex
 
 #############################################
 ## Convert the flex-compiler-oem module

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/9620315b/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 36739bf..729d608 100644
--- a/pom.xml
+++ b/pom.xml
@@ -77,10 +77,12 @@
                 <activeByDefault>true</activeByDefault>
             </activation>
             <modules>
+                <module>compiler-build-tools</module>
                 <module>compiler</module>
                 <module>compiler.jx</module>
                 <module>flex-compiler-oem</module>
                 <module>externs</module>
+                <module>flexjs-maven-plugin</module>
             </modules>
         </profile>
 


Mime
View raw message