Repository: flex-falcon
Updated Branches:
  refs/heads/feature/maven-migration 02d6ae989 -> a7fe27414


Made "resources" config property optional and added a check that it's provided 
in the mojo to prevent having to provide this option for every execution


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

Branch: refs/heads/feature/maven-migration
Commit: 933d0249ea83c6684346c62883c7448147899daa
Parents: 02d6ae9
Author: Christofer Dutz <[email protected]>
Authored: Sat Mar 19 13:34:50 2016 +0100
Committer: Christofer Dutz <[email protected]>
Committed: Sat Mar 19 13:34:50 2016 +0100

----------------------------------------------------------------------
 .../apache/flex/compiler/tools/unpack/UnpackResourceMojo.java  | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/933d0249/compiler-build-tools/src/main/java/org/apache/flex/compiler/tools/unpack/UnpackResourceMojo.java
----------------------------------------------------------------------
diff --git 
a/compiler-build-tools/src/main/java/org/apache/flex/compiler/tools/unpack/UnpackResourceMojo.java
 
b/compiler-build-tools/src/main/java/org/apache/flex/compiler/tools/unpack/UnpackResourceMojo.java
index aa5ac4f..49b14c9 100644
--- 
a/compiler-build-tools/src/main/java/org/apache/flex/compiler/tools/unpack/UnpackResourceMojo.java
+++ 
b/compiler-build-tools/src/main/java/org/apache/flex/compiler/tools/unpack/UnpackResourceMojo.java
@@ -24,7 +24,7 @@ public class UnpackResourceMojo
     private static final int MEGABYTE = KILOBYTE * 1024;
     private static final int BUFFER_MAX = MEGABYTE;
 
-    @Parameter(required = true)
+    @Parameter// (required = true) Actually required, but only by this goal
     private String resource;
 
     @Parameter(defaultValue="${project.build.directory}/downloads")
@@ -32,6 +32,10 @@ public class UnpackResourceMojo
 
     @Override
     public void execute() throws MojoExecutionException, MojoFailureException {
+        if(resource == null) {
+            throw new MojoExecutionException("Config parameter 'resource' 
required for this goal.");
+        }
+
         InputStream is = 
getClass().getClassLoader().getResourceAsStream(resource);
         if(is == null) {
             throw new MojoExecutionException("Could not find resource " + 
resource);

Reply via email to