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 AbstractDefinePropertyMojo
Define 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 executing MavenSession,
  • settings: the executing Settings.
  • log: the logger of the Mojo (see AbstractMojo.getLog()).
Since:
1.8
  • Field Details

    • source

      @Parameter(required=true) private String source
    • properties

      @Parameter private 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 mavenSession
      The Maven Session.
    • settings

      @Parameter(readonly=true, defaultValue="${settings}") private org.apache.maven.settings.Settings settings
      The Maven Settings.
  • Constructor Details

    • BeanshellPropertyMojo

      public BeanshellPropertyMojo()
  • Method Details

    • execute

      public void execute() throws org.apache.maven.plugin.MojoFailureException
      Main plugin execution
      Throws:
      org.apache.maven.plugin.MojoFailureException
    • set

      private void set(bsh.Interpreter interpreter, String name, Object value) throws org.apache.maven.plugin.MojoFailureException
      Throws:
      org.apache.maven.plugin.MojoFailureException