You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by jd...@apache.org on 2006/01/11 04:38:22 UTC
svn commit: r367900 - in
/maven/components/trunk/integration-tests/maven-core-it-plugin: pom.xml
src/main/java/org/apache/maven/plugin/coreit/RunnableMojo.java
Author: jdcasey
Date: Tue Jan 10 19:38:18 2006
New Revision: 367900
URL: http://svn.apache.org/viewcvs?rev=367900&view=rev
Log:
Removing xalan dep, and fixing runnable mojo.
Modified:
maven/components/trunk/integration-tests/maven-core-it-plugin/pom.xml
maven/components/trunk/integration-tests/maven-core-it-plugin/src/main/java/org/apache/maven/plugin/coreit/RunnableMojo.java
Modified: maven/components/trunk/integration-tests/maven-core-it-plugin/pom.xml
URL: http://svn.apache.org/viewcvs/maven/components/trunk/integration-tests/maven-core-it-plugin/pom.xml?rev=367900&r1=367899&r2=367900&view=diff
==============================================================================
--- maven/components/trunk/integration-tests/maven-core-it-plugin/pom.xml (original)
+++ maven/components/trunk/integration-tests/maven-core-it-plugin/pom.xml Tue Jan 10 19:38:18 2006
@@ -3,7 +3,7 @@
<parent>
<artifactId>maven-plugin-parent</artifactId>
<groupId>org.apache.maven.plugins</groupId>
- <version>2.0-beta-3</version>
+ <version>2.0.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>maven-core-it-plugin</artifactId>
Modified: maven/components/trunk/integration-tests/maven-core-it-plugin/src/main/java/org/apache/maven/plugin/coreit/RunnableMojo.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/integration-tests/maven-core-it-plugin/src/main/java/org/apache/maven/plugin/coreit/RunnableMojo.java?rev=367900&r1=367899&r2=367900&view=diff
==============================================================================
--- maven/components/trunk/integration-tests/maven-core-it-plugin/src/main/java/org/apache/maven/plugin/coreit/RunnableMojo.java (original)
+++ maven/components/trunk/integration-tests/maven-core-it-plugin/src/main/java/org/apache/maven/plugin/coreit/RunnableMojo.java Tue Jan 10 19:38:18 2006
@@ -4,7 +4,7 @@
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 @@
*/
private String script;
- public void execute() throws MojoFailureException
+ public void execute() throws MojoExecutionException
{
Interpreter terp = new Interpreter();
@@ -27,14 +27,13 @@
{
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 );
}
}
}