Annotation Interface Mojo
This annotation will mark your class as a Mojo (ie. goal in a Maven plugin).
- Since:
- 3.0
-
Required Element Summary
Required Elements -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionboolean
if the Mojo uses the Maven project and its child modules.own configurator class.default phase to bind your mojo.execution strategy:once-per-session
oralways
.boolean
your Mojo instantiation strategy.the required dependency collection scope.the required dependency resolution scope.boolean
can this Mojo be invoked directly only?boolean
does this Mojo need to be online to be executed?boolean
does your mojo requires a project to be executed?boolean
does your mojo requires a reporting context to be executed?boolean
is your mojo thread safe (since Maven 3.x)?
-
Element Details
-
name
String namegoal name (required).- Returns:
- the goal name
-
-
-
defaultPhase
LifecyclePhase defaultPhasedefault phase to bind your mojo.- Returns:
- the default phase
- Default:
- NONE
-
requiresDependencyResolution
ResolutionScope requiresDependencyResolutionthe required dependency resolution scope.- Returns:
- the required dependency resolution scope
- Default:
- NONE
-
requiresDependencyCollection
ResolutionScope requiresDependencyCollectionthe required dependency collection scope.- Returns:
- the required dependency collection scope
- Default:
- NONE
-
instantiationStrategy
InstantiationStrategy instantiationStrategyyour Mojo instantiation strategy. (Onlyper-lookup
andsingleton
are supported)- Returns:
- the instantiation strategy
- Default:
- PER_LOOKUP
-
executionStrategy
String executionStrategyexecution strategy:once-per-session
oralways
.- Returns:
once-per-session
oralways
- Default:
- "once-per-session"
-
requiresProject
boolean requiresProjectdoes your mojo requires a project to be executed?- Returns:
- requires a project
- Default:
- true
-
requiresReports
boolean requiresReportsdoes your mojo requires a reporting context to be executed?- Returns:
- requires a reporting context
- Default:
- false
-
aggregator
boolean aggregatorif the Mojo uses the Maven project and its child modules.- Returns:
- uses the Maven project and its child modules
- Default:
- false
-
requiresDirectInvocation
boolean requiresDirectInvocationcan this Mojo be invoked directly only?- Returns:
- invoked directly only
- Default:
- false
-
requiresOnline
boolean requiresOnlinedoes this Mojo need to be online to be executed?- Returns:
- need to be online
- Default:
- false
-
inheritByDefault
boolean inheritByDefault- Default:
- true
-
configurator
String configuratorown configurator class.- Returns:
- own configurator class
- Default:
- ""
-
threadSafe
boolean threadSafeis your mojo thread safe (since Maven 3.x)?- Returns:
- is thread safe
- Default:
- false
-