Repository: flex-falcon
Updated Branches:
  refs/heads/develop a323822f3 -> 70a7dc208


- Added a new compiler option "removeCirculars"
- Adjusted the compiler mojo to fail in case of build errors (except the js 
generation mojo) (Disabled till the last build errors in the examples are fixed)
- Cleaned up the dependencies
- Added missing dependencies


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

Branch: refs/heads/develop
Commit: 70a7dc208e1ad7508c6201827eea05dbeb8a36e5
Parents: a323822
Author: Christofer Dutz <[email protected]>
Authored: Thu Jun 30 19:16:38 2016 +0200
Committer: Christofer Dutz <[email protected]>
Committed: Thu Jun 30 19:16:38 2016 +0200

----------------------------------------------------------------------
 .../main/java/org/apache/flex/maven/flexjs/BaseMojo.java |  9 ++++++++-
 .../org/apache/flex/maven/flexjs/CompileAppMojo.java     | 11 +++++++++++
 .../java/org/apache/flex/maven/flexjs/CompileJSMojo.java |  5 +++++
 .../resources/config/compile-app-javascript-config.xml   |  3 +++
 4 files changed, 27 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/70a7dc20/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 6af130c..ba5a607 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
@@ -213,7 +213,14 @@ public abstract class BaseMojo
         FlexTool tool = toolGroup.getFlexTool(getFlexTool());
         String[] args = getCompilerArgs(configFile).toArray(new String[0]);
         getLog().info("Executing " + getFlexTool() + " in tool group " + 
getToolGroupName() + " with args: " + Arrays.toString(args));
-        tool.execute(args);
+        int exitCode = tool.execute(args);
+        handleExitCode(exitCode);
+    }
+
+    protected void handleExitCode(int exitCode) throws MojoExecutionException {
+        if(exitCode != 0) {
+            //throw new MojoExecutionException("There were errors during the 
build.");
+        }
     }
 
     protected List<Artifact> getLibraries(List<Artifact> artifacts) {

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/70a7dc20/flexjs-maven-plugin/src/main/java/org/apache/flex/maven/flexjs/CompileAppMojo.java
----------------------------------------------------------------------
diff --git 
a/flexjs-maven-plugin/src/main/java/org/apache/flex/maven/flexjs/CompileAppMojo.java
 
b/flexjs-maven-plugin/src/main/java/org/apache/flex/maven/flexjs/CompileAppMojo.java
index 4483227..65d7a74 100644
--- 
a/flexjs-maven-plugin/src/main/java/org/apache/flex/maven/flexjs/CompileAppMojo.java
+++ 
b/flexjs-maven-plugin/src/main/java/org/apache/flex/maven/flexjs/CompileAppMojo.java
@@ -22,6 +22,7 @@ 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.MavenProjectHelper;
+import org.apache.velocity.VelocityContext;
 
 import java.io.*;
 import java.util.Collections;
@@ -54,6 +55,9 @@ public class CompileAppMojo
     @Parameter(defaultValue = "false")
     protected boolean outputJavaScript;
 
+    @Parameter(defaultValue = "false")
+    protected boolean removeCirculars;
+
     @Component
     protected MavenProjectHelper mavenProjectHelper;
 
@@ -79,6 +83,13 @@ public class CompileAppMojo
     }
 
     @Override
+    protected VelocityContext getVelocityContext() throws 
MojoExecutionException {
+        VelocityContext context = super.getVelocityContext();
+        context.put("removeCirculars", removeCirculars);
+        return context;
+    }
+
+    @Override
     protected File getOutput() {
         if(outputJavaScript) {
             return new File(outputDirectory, "javascript");

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/70a7dc20/flexjs-maven-plugin/src/main/java/org/apache/flex/maven/flexjs/CompileJSMojo.java
----------------------------------------------------------------------
diff --git 
a/flexjs-maven-plugin/src/main/java/org/apache/flex/maven/flexjs/CompileJSMojo.java
 
b/flexjs-maven-plugin/src/main/java/org/apache/flex/maven/flexjs/CompileJSMojo.java
index 2dcf47d..d0fa995 100644
--- 
a/flexjs-maven-plugin/src/main/java/org/apache/flex/maven/flexjs/CompileJSMojo.java
+++ 
b/flexjs-maven-plugin/src/main/java/org/apache/flex/maven/flexjs/CompileJSMojo.java
@@ -77,6 +77,11 @@ public class CompileJSMojo
     }
 
     @Override
+    protected void handleExitCode(int exitCode) throws MojoExecutionException {
+        // Ignore exit codes ... for now ...
+    }
+
+    @Override
     protected List<String> getCompilerArgs(File configFile) throws 
MojoExecutionException {
         List<String> args = super.getCompilerArgs(configFile);
         args.add("-js-output-type=FLEXJS");

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/70a7dc20/flexjs-maven-plugin/src/main/resources/config/compile-app-javascript-config.xml
----------------------------------------------------------------------
diff --git 
a/flexjs-maven-plugin/src/main/resources/config/compile-app-javascript-config.xml
 
b/flexjs-maven-plugin/src/main/resources/config/compile-app-javascript-config.xml
index 4f75494..d0c5de4 100644
--- 
a/flexjs-maven-plugin/src/main/resources/config/compile-app-javascript-config.xml
+++ 
b/flexjs-maven-plugin/src/main/resources/config/compile-app-javascript-config.xml
@@ -354,6 +354,9 @@
   <compute-digest>boolean</compute-digest>
   -->
 
+  <!-- remove circular dependencies -->
+  <remove-circulars>$removeCirculars</remove-circulars>
+
   <!-- remove-unused-rsls: remove RSLs that are not being used by the 
application-->
   <remove-unused-rsls>true</remove-unused-rsls>
 

Reply via email to