Author: bentmann
Date: Sat Aug 23 13:13:16 2008
New Revision: 688405

URL: http://svn.apache.org/viewvc?rev=688405&view=rev
Log:
o Clarified failure conditions

Modified:
    
maven/plugins/trunk/maven-invoker-plugin/src/main/java/org/apache/maven/plugin/invoker/InvokerMojo.java
    
maven/plugins/trunk/maven-invoker-plugin/src/site/apt/examples/post-build-script.apt.vm

Modified: 
maven/plugins/trunk/maven-invoker-plugin/src/main/java/org/apache/maven/plugin/invoker/InvokerMojo.java
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-invoker-plugin/src/main/java/org/apache/maven/plugin/invoker/InvokerMojo.java?rev=688405&r1=688404&r2=688405&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-invoker-plugin/src/main/java/org/apache/maven/plugin/invoker/InvokerMojo.java
 (original)
+++ 
maven/plugins/trunk/maven-invoker-plugin/src/main/java/org/apache/maven/plugin/invoker/InvokerMojo.java
 Sat Aug 23 13:13:16 2008
@@ -215,7 +215,10 @@
     /**
      * Relative path of a pre-build hook script to run prior to executing the 
build. This script may be written with
      * either BeanShell or Groovy (since 1.3). If the file extension is 
omitted (e.g. <code>prebuild</code>), the plugin
-     * searches for the file by trying out the well-known extensions 
<code>.bsh</code> and <code>.groovy</code>.
+     * searches for the file by trying out the well-known extensions 
<code>.bsh</code> and <code>.groovy</code>. If this
+     * script exists for a particular project but returns any value different 
from <code>true</code> or throws an
+     * exception, the corresponding build is flagged as a failure. In this 
case, neither Maven nor the post-build hook
+     * script will be invoked.
      * 
      * @parameter expression="${invoker.preBuildHookScript}" 
default-value="prebuild.bsh"
      */
@@ -225,6 +228,8 @@
      * Relative path of a cleanup/verification hook script to run after 
executing the build. This script may be written
      * with either BeanShell or Groovy (since 1.3). If the file extension is 
omitted (e.g. <code>verify</code>), the
      * plugin searches for the file by trying out the well-known extensions 
<code>.bsh</code> and <code>.groovy</code>.
+     * If this script exists for a particular project but returns any value 
different from <code>true</code> or throws
+     * an exception, the corresponding build is flagged as a failure.
      * 
      * @parameter expression="${invoker.postBuildHookScript}" 
default-value="postbuild.bsh"
      */

Modified: 
maven/plugins/trunk/maven-invoker-plugin/src/site/apt/examples/post-build-script.apt.vm
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-invoker-plugin/src/site/apt/examples/post-build-script.apt.vm?rev=688405&r1=688404&r2=688405&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-invoker-plugin/src/site/apt/examples/post-build-script.apt.vm
 (original)
+++ 
maven/plugins/trunk/maven-invoker-plugin/src/site/apt/examples/post-build-script.apt.vm
 Sat Aug 23 13:13:16 2008
@@ -65,10 +65,12 @@
 </project>
 -------------------
 
-  Here is an example post build BeanShell script (<<<verify.bsh>>>) that 
checks for the existence 
-  of a JAR file after the build has run.  If the JAR file does not exist, the
-  script returns <<<false>>> which causes the Invoker Plugin to log that the 
build failed.
-          
+  Here is an example post build BeanShell script (<<<verify.bsh>>>) that 
checks for the existence of a JAR file after
+  the build has run.  If the JAR file does not exist, the script returns 
<<<false>>> which causes the Invoker Plugin to
+  log that the build failed. More precisely, any return value which does not 
equal <<<true>>> will be interpreted as a
+  failure condition. And of course, if the script exists abnormally due to an 
exception, the plugin will flag the
+  corresponding build as a failure, too.
+
 -------------------
 import java.io.*;
 


Reply via email to