File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed 
src/main/java/org/glassfish/build Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 11/* 
22 * Copyright (c) 2012, 2018 Oracle and/or its affiliates. All rights reserved. 
3+  * Copyright (c) 2019 Payara Services Ltd. 
34 * 
45 * This program and the accompanying materials are made available under the 
56 * terms of the Eclipse Public License v. 2.0, which is available at 
@@ -69,6 +70,12 @@ public final class ExecMojo extends AbstractMojo {
6970    @ Parameter (property  = "commandlineArgs" )
7071    private  String  commandlineArgs ;
7172
73+     /** 
74+      * Plugin should return failure if an error occurred. 
75+      */ 
76+     @ Parameter (property  = "failOnError" , defaultValue  = "true" )
77+     private  Boolean  failOnError ;
78+ 
7279    @ Override 
7380    public  void  execute () throws  MojoExecutionException , MojoFailureException  {
7481
@@ -94,6 +101,7 @@ && new File(executable + ".bat").exists()) {
94101        exec .setExecutable (executable );
95102        getLog ().info ("executable: "  + executable );
96103        exec .createArg ().setLine (commandlineArgs );
104+         exec .setFailonerror (failOnError );
97105        getLog ().info ("commandLineArgs: "  + commandlineArgs );
98106        exec .execute ();
99107    }
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments