Interface FieldContext

All Known Implementing Classes:
AbstractPropertyHelperMojo, GetMojo, IncMojo

public interface FieldContext
All accessible values from the Maven build system for a Field.
  • Method Details

    • forTesting

      static FieldContext forTesting()
      Returns a fixed instance for testing. Do not use outside test code.
    • forTesting

      static FieldContext forTesting(Random random)
      Returns a fixed instance for testing. The Random instance can be set to simulate reproducible builds.
    • getMacros

      Map<String,MacroType> getMacros()
      Returns a map with all known macros. Key value is the macro hint as given by the plexus component annotation.
      Returns:
      A map with all known macros.
    • getProjectProperties

      Properties getProjectProperties()
      Return the maven project properties.
      Returns:
      A properties object for the project properties.
    • getProject

      org.apache.maven.project.MavenProject getProject()
      Returns a reference to the MavenProject.
      Returns:
      A MavenProject object
    • getSettings

      org.apache.maven.settings.Settings getSettings()
      Returns the current maven Settings object
      Returns:
      A Settings object
    • getBasedir

      File getBasedir()
      Returns the base dir for this maven build execution.
      Returns:
      A File object.
    • getInterpolatorFactory

      InterpolatorFactory getInterpolatorFactory()
      Returns the InterpolatorFactory that can interpolate "late resolution" properties.
      Returns:
      An InterpolatorFactory reference.
    • getTransformerRegistry

      TransformerRegistry getTransformerRegistry()
      Returns a reference to the TransformerRegistry.
      Returns:
      A TransformerRegistry object.
    • getRandom

      Random getRandom()
      Returns a SecureRandom instance for generating random values.