mirror of https://github.com/apache/maven.git
Removing xalan dep, and fixing runnable mojo.
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@367900 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
049977a260
commit
191af0e678
|
@ -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>
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue