Author: olamy Date: Tue Nov 8 21:51:13 2011 New Revision: 1199475 URL: http://svn.apache.org/viewvc?rev=1199475&view=rev Log: ename BuildFailureException to RunFailureException as we are running a script here
Added: maven/shared/trunk/maven-script-interpreter/src/main/java/org/apache/maven/shared/scriptinterpreter/RunFailureException.java (contents, props changed) - copied, changed from r1199474, maven/shared/trunk/maven-script-interpreter/src/main/java/org/apache/maven/shared/scriptinterpreter/BuildFailureException.java Removed: maven/shared/trunk/maven-script-interpreter/src/main/java/org/apache/maven/shared/scriptinterpreter/BuildFailureException.java Modified: maven/shared/trunk/maven-script-interpreter/src/main/java/org/apache/maven/shared/scriptinterpreter/RunErrorException.java maven/shared/trunk/maven-script-interpreter/src/main/java/org/apache/maven/shared/scriptinterpreter/ScriptRunner.java Modified: maven/shared/trunk/maven-script-interpreter/src/main/java/org/apache/maven/shared/scriptinterpreter/RunErrorException.java URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-script-interpreter/src/main/java/org/apache/maven/shared/scriptinterpreter/RunErrorException.java?rev=1199475&r1=1199474&r2=1199475&view=diff ============================================================================== --- maven/shared/trunk/maven-script-interpreter/src/main/java/org/apache/maven/shared/scriptinterpreter/RunErrorException.java (original) +++ maven/shared/trunk/maven-script-interpreter/src/main/java/org/apache/maven/shared/scriptinterpreter/RunErrorException.java Tue Nov 8 21:51:13 2011 @@ -27,7 +27,7 @@ package org.apache.maven.shared.scriptin * @version $Id$ */ public class RunErrorException - extends BuildFailureException + extends RunFailureException { /** Copied: maven/shared/trunk/maven-script-interpreter/src/main/java/org/apache/maven/shared/scriptinterpreter/RunFailureException.java (from r1199474, maven/shared/trunk/maven-script-interpreter/src/main/java/org/apache/maven/shared/scriptinterpreter/BuildFailureException.java) URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-script-interpreter/src/main/java/org/apache/maven/shared/scriptinterpreter/RunFailureException.java?p2=maven/shared/trunk/maven-script-interpreter/src/main/java/org/apache/maven/shared/scriptinterpreter/RunFailureException.java&p1=maven/shared/trunk/maven-script-interpreter/src/main/java/org/apache/maven/shared/scriptinterpreter/BuildFailureException.java&r1=1199474&r2=1199475&rev=1199475&view=diff ============================================================================== --- maven/shared/trunk/maven-script-interpreter/src/main/java/org/apache/maven/shared/scriptinterpreter/BuildFailureException.java (original) +++ maven/shared/trunk/maven-script-interpreter/src/main/java/org/apache/maven/shared/scriptinterpreter/RunFailureException.java Tue Nov 8 21:51:13 2011 @@ -26,7 +26,7 @@ package org.apache.maven.shared.scriptin * @author Benjamin Bentmann * @version $Id$ */ -public class BuildFailureException +public class RunFailureException extends Exception { @@ -46,7 +46,7 @@ public class BuildFailureException * @param message The detail message, may be <code>null</code>. * @param type The type of build failure, may not be <code>null</code>. */ - public BuildFailureException( String message, String type ) + public RunFailureException( String message, String type ) { super( message ); if ( type == null ) Propchange: maven/shared/trunk/maven-script-interpreter/src/main/java/org/apache/maven/shared/scriptinterpreter/RunFailureException.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/shared/trunk/maven-script-interpreter/src/main/java/org/apache/maven/shared/scriptinterpreter/RunFailureException.java ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Modified: maven/shared/trunk/maven-script-interpreter/src/main/java/org/apache/maven/shared/scriptinterpreter/ScriptRunner.java URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-script-interpreter/src/main/java/org/apache/maven/shared/scriptinterpreter/ScriptRunner.java?rev=1199475&r1=1199474&r2=1199475&view=diff ============================================================================== --- maven/shared/trunk/maven-script-interpreter/src/main/java/org/apache/maven/shared/scriptinterpreter/ScriptRunner.java (original) +++ maven/shared/trunk/maven-script-interpreter/src/main/java/org/apache/maven/shared/scriptinterpreter/ScriptRunner.java Tue Nov 8 21:51:13 2011 @@ -148,16 +148,16 @@ public class ScriptRunner * @param context The key-value storage used to share information between hook scripts, may be <code>null</code>. * @param logger The logger to redirect the script output to, may be <code>null</code> to use stdout/stderr. * @param stage The stage of the build job the script is invoked in, must not be <code>null</code>. - * @param failOnException If <code>true</code> and the script throws an exception, then a {@link BuildFailureException} + * @param failOnException If <code>true</code> and the script throws an exception, then a {@link RunFailureException} * will be thrown, otherwise a {@link RunErrorException} will be thrown on script exception. * @throws org.apache.maven.plugin.MojoExecutionException * If an I/O error occurred while reading the script file. - * @throws BuildFailureException If the script did not return <code>true</code> of threw an exception. + * @throws RunFailureException If the script did not return <code>true</code> of threw an exception. */ public void run( final String scriptDescription, final File basedir, final String relativeScriptPath, final Map<String, ? extends Object> context, final ExecutionLogger logger, String stage, boolean failOnException ) - throws MojoExecutionException, BuildFailureException + throws MojoExecutionException, RunFailureException { if ( relativeScriptPath == null ) { @@ -228,7 +228,7 @@ public class ScriptRunner } if ( failOnException ) { - throw new BuildFailureException( "The " + scriptDescription + " did not succeed. " + msg, stage ); + throw new RunFailureException( "The " + scriptDescription + " did not succeed. " + msg, stage ); } else { @@ -238,7 +238,7 @@ public class ScriptRunner if ( !( result == null || Boolean.TRUE.equals( result ) || "true".equals( result ) ) ) { - throw new BuildFailureException( "The " + scriptDescription + " returned " + result + ".", stage ); + throw new RunFailureException( "The " + scriptDescription + " returned " + result + ".", stage ); } }