Package org.basepom.mojo.propertyhelper
Interface FieldContext
- All Known Implementing Classes:
AbstractPropertyHelperMojo
,GetMojo
,IncMojo
public interface FieldContext
All accessible values from the Maven build system for a Field.
-
Method Summary
Modifier and TypeMethodDescriptionstatic FieldContext
Returns a fixed instance for testing.static FieldContext
forTesting
(Random random) Returns a fixed instance for testing.Returns the base dir for this maven build execution.Returns theInterpolatorFactory
that can interpolate "late resolution" properties.Returns a map with all known macros.org.apache.maven.project.MavenProject
Returns a reference to theMavenProject
.Return the maven project properties.Returns aSecureRandom
instance for generating random values.org.apache.maven.settings.Settings
Returns the current mavenSettings
objectReturns a reference to theTransformerRegistry
.
-
Method Details
-
forTesting
Returns a fixed instance for testing. Do not use outside test code. -
forTesting
Returns a fixed instance for testing. The Random instance can be set to simulate reproducible builds. -
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
Return the maven project properties.- Returns:
- A properties object for the project properties.
-
getProject
org.apache.maven.project.MavenProject getProject()Returns a reference to theMavenProject
.- Returns:
- A
MavenProject
object
-
getSettings
org.apache.maven.settings.Settings getSettings()Returns the current mavenSettings
object- Returns:
- A
Settings
object
-
getBasedir
Returns the base dir for this maven build execution.- Returns:
- A
File
object.
-
getInterpolatorFactory
Returns theInterpolatorFactory
that can interpolate "late resolution" properties.- Returns:
- An
InterpolatorFactory
reference.
-
getTransformerRegistry
Returns a reference to theTransformerRegistry
.- Returns:
- A
TransformerRegistry
object.
-
getRandom
Returns aSecureRandom
instance for generating random values.
-