Package org.codehaus.mojo.buildhelper
Class BeanshellPropertyMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.codehaus.mojo.buildhelper.AbstractDefinePropertyMojo
-
- org.codehaus.mojo.buildhelper.BeanshellPropertyMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="bsh-property", defaultPhase=VALIDATE, threadSafe=true) public class BeanshellPropertyMojo extends AbstractDefinePropertyMojoDefine one or many properties as a result of a Beanshell script invocation. Like gmaven-plugin, some variables are defined:project: the actual Maven project,session: the executingMavenSession,settings: the executingSettings.log: the logger of the Mojo (seeAbstractMojo.getLog()).
- Since:
- 1.8
-
-
Field Summary
Fields Modifier and Type Field Description private org.apache.maven.execution.MavenSessionmavenSessionThe Maven Session.private java.lang.String[]propertiesList of property names to get from script context after execution.private org.apache.maven.settings.SettingssettingsThe Maven Settings.private java.lang.Stringsource-
Fields inherited from class org.codehaus.mojo.buildhelper.AbstractDefinePropertyMojo
project
-
-
Constructor Summary
Constructors Constructor Description BeanshellPropertyMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute()Main plugin executionprivate voidset(bsh.Interpreter interpreter, java.lang.String name, java.lang.Object value)-
Methods inherited from class org.codehaus.mojo.buildhelper.AbstractDefinePropertyMojo
defineProperty, getProject
-
-
-
-
Field Detail
-
source
@Parameter(required=true) private java.lang.String source
-
properties
@Parameter private java.lang.String[] properties
List of property names to get from script context after execution. Can be omitted if no property needs to be defined, just the script execution.
-
mavenSession
@Parameter(readonly=true, defaultValue="${session}") private org.apache.maven.execution.MavenSession mavenSessionThe Maven Session.
-
settings
@Parameter(readonly=true, defaultValue="${settings}") private org.apache.maven.settings.Settings settingsThe Maven Settings.
-
-
Method Detail
-
execute
public void execute() throws org.apache.maven.plugin.MojoFailureExceptionMain plugin execution- Throws:
org.apache.maven.plugin.MojoFailureException
-
set
private void set(bsh.Interpreter interpreter, java.lang.String name, java.lang.Object value) throws org.apache.maven.plugin.MojoFailureException- Throws:
org.apache.maven.plugin.MojoFailureException
-
-