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>
|
<parent>
|
||||||
<artifactId>maven-plugin-parent</artifactId>
|
<artifactId>maven-plugin-parent</artifactId>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<version>2.0-beta-3</version>
|
<version>2.0.1</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>maven-core-it-plugin</artifactId>
|
<artifactId>maven-core-it-plugin</artifactId>
|
||||||
|
|
|
@ -4,7 +4,7 @@ import bsh.EvalError;
|
||||||
import bsh.Interpreter;
|
import bsh.Interpreter;
|
||||||
|
|
||||||
import org.apache.maven.plugin.AbstractMojo;
|
import org.apache.maven.plugin.AbstractMojo;
|
||||||
import org.apache.maven.plugin.MojoFailureException;
|
import org.apache.maven.plugin.MojoExecutionException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @goal runnable
|
* @goal runnable
|
||||||
|
@ -19,7 +19,7 @@ public class RunnableMojo
|
||||||
*/
|
*/
|
||||||
private String script;
|
private String script;
|
||||||
|
|
||||||
public void execute() throws MojoFailureException
|
public void execute() throws MojoExecutionException
|
||||||
{
|
{
|
||||||
Interpreter terp = new Interpreter();
|
Interpreter terp = new Interpreter();
|
||||||
|
|
||||||
|
@ -27,14 +27,13 @@ public class RunnableMojo
|
||||||
{
|
{
|
||||||
getLog().info( "Executing in java version: " + System.getProperty( "java.version" ) );
|
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 )
|
catch ( EvalError e )
|
||||||
{
|
{
|
||||||
throw new MojoFailureException( this, "Failed to evaluate script.", "Script: \n\n" + script
|
throw new MojoExecutionException( "Failed to evaluate script.", e );
|
||||||
+ "\n\nfailed to evaluate. Error: " + e.getMessage() + "\nLine: " + e.getErrorLineNumber() );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue