diff --git a/integration-tests/maven-core-it-plugin/pom.xml b/integration-tests/maven-core-it-plugin/pom.xml
index 2da63b2df5..94af9ca843 100644
--- a/integration-tests/maven-core-it-plugin/pom.xml
+++ b/integration-tests/maven-core-it-plugin/pom.xml
@@ -3,7 +3,7 @@
maven-plugin-parent
org.apache.maven.plugins
- 2.0-beta-3
+ 2.0.1
4.0.0
maven-core-it-plugin
diff --git a/integration-tests/maven-core-it-plugin/src/main/java/org/apache/maven/plugin/coreit/RunnableMojo.java b/integration-tests/maven-core-it-plugin/src/main/java/org/apache/maven/plugin/coreit/RunnableMojo.java
index 1d91dd24ab..26a23970fa 100644
--- a/integration-tests/maven-core-it-plugin/src/main/java/org/apache/maven/plugin/coreit/RunnableMojo.java
+++ b/integration-tests/maven-core-it-plugin/src/main/java/org/apache/maven/plugin/coreit/RunnableMojo.java
@@ -4,7 +4,7 @@ import bsh.EvalError;
import bsh.Interpreter;
import org.apache.maven.plugin.AbstractMojo;
-import org.apache.maven.plugin.MojoFailureException;
+import org.apache.maven.plugin.MojoExecutionException;
/**
* @goal runnable
@@ -19,7 +19,7 @@ public class RunnableMojo
*/
private String script;
- public void execute() throws MojoFailureException
+ public void execute() throws MojoExecutionException
{
Interpreter terp = new Interpreter();
@@ -27,14 +27,13 @@ public class RunnableMojo
{
getLog().info( "Executing in java version: " + System.getProperty( "java.version" ) );
- Class result = (Class) terp.eval( script );
+ Object result = terp.eval( script );
- getLog().info( "Result of script evaluation was: " + result + "\nLoaded from: " + result.getClassLoader() );
+ getLog().info( "Result of script evaluation was: " + result + "\nLoaded from: " + result.getClass().getClassLoader() );
}
catch ( EvalError e )
{
- throw new MojoFailureException( this, "Failed to evaluate script.", "Script: \n\n" + script
- + "\n\nfailed to evaluate. Error: " + e.getMessage() + "\nLine: " + e.getErrorLineNumber() );
+ throw new MojoExecutionException( "Failed to evaluate script.", e );
}
}
}