Class AbstractPropertyHelperMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.basepom.mojo.propertyhelper.AbstractPropertyHelperMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
GetPropertiesMojo, IncrementNumbersMojo

public abstract class AbstractPropertyHelperMojo extends org.apache.maven.plugin.AbstractMojo
Base code for all the mojos.
  • Field Details

    • LOG

      protected static final Log LOG
    • valueCache

      protected final ValueCache valueCache
    • onDuplicateProperty

      @Parameter(defaultValue="fail") public String onDuplicateProperty
      Defines the action to take if a property is present multiple times.
    • onMissingProperty

      @Parameter(defaultValue="fail") public String onMissingProperty
      Defines the action to take if a referenced property is missing.
    • activeGroups

      @Parameter public String[] activeGroups
      List of the property group ids to activate for a plugin execution.
    • propertyGroups

      @Parameter public PropertyGroup[] propertyGroups
      List of available property groups. A property group contains one or more property definitions and must be activated with activeGroups.
    • numbers

      @Parameter public NumberDefinition[] numbers
      Number property definitions.
    • strings

      @Parameter public StringDefinition[] strings
      String property definitions.
    • dates

      @Parameter public DateDefinition[] dates
      Date property definitions.
    • macros

      @Parameter public MacroDefinition[] macros
      Macro definitions.
    • uuids

      @Parameter public UuidDefinition[] uuids
      Uuid definitions.
    • project

      @Parameter(defaultValue="${project}", readonly=true) public org.apache.maven.project.MavenProject project
      The maven project (effective pom).
    • settings

      @Parameter(defaultValue="${settings}", readonly=true) public org.apache.maven.settings.Settings settings
    • basedir

      @Parameter(required=true, readonly=true, defaultValue="${project.basedir}") public File basedir
    • numberFields

      public List<NumberField> numberFields
    • macroMap

      @Inject public Map<String,MacroType> macroMap
  • Constructor Details

    • AbstractPropertyHelperMojo

      public AbstractPropertyHelperMojo()
  • Method Details

    • execute

      public void execute() throws org.apache.maven.plugin.MojoExecutionException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
    • getProject

      public org.apache.maven.project.MavenProject getProject()
    • getSettings

      public org.apache.maven.settings.Settings getSettings()
    • getBasedir

      public File getBasedir()
    • getMacros

      public Map<String,MacroType> getMacros()
    • getNumbers

      @CheckForNull public List<NumberField> getNumbers()
    • doExecute

      protected abstract void doExecute() throws IOException, org.apache.maven.plugin.MojoExecutionException
      Subclasses need to implement this method.
      Throws:
      IOException
      org.apache.maven.plugin.MojoExecutionException
    • loadPropertyElements

      protected void loadPropertyElements() throws org.apache.maven.plugin.MojoExecutionException, IOException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
      IOException