Annotation Type Mojo
-
@Documented @Retention(CLASS) @Target(TYPE) @Inherited public @interface Mojo
This annotation will mark your class as a Mojo (ie. goal in a Maven plugin).- Since:
- 3.0
- Author:
- Olivier Lamy
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description boolean
aggregator
if the Mojo uses the Maven project and its child modules.String
configurator
own configurator class.LifecyclePhase
defaultPhase
default phase to bind your mojo.String
executionStrategy
execution strategy:once-per-session
oralways
.boolean
inheritByDefault
InstantiationStrategy
instantiationStrategy
your Mojo instantiation strategy.ResolutionScope
requiresDependencyCollection
the required dependency collection scope.ResolutionScope
requiresDependencyResolution
the required dependency resolution scope.boolean
requiresDirectInvocation
can this Mojo be invoked directly only?boolean
requiresOnline
does this Mojo need to be online to be executed?boolean
requiresProject
does your mojo requires a project to be executed?boolean
requiresReports
does your mojo requires a reporting context to be executed?boolean
threadSafe
is your mojo thread safe (since Maven 3.x)?
-
-
-
Element Detail
-
name
String name
goal name (required).- Returns:
- the goal name
-
-
-
defaultPhase
LifecyclePhase defaultPhase
default phase to bind your mojo.- Returns:
- the default phase
- Default:
- org.apache.maven.plugins.annotations.LifecyclePhase.NONE
-
-
-
requiresDependencyResolution
ResolutionScope requiresDependencyResolution
the required dependency resolution scope.- Returns:
- the required dependency resolution scope
- Default:
- org.apache.maven.plugins.annotations.ResolutionScope.NONE
-
-
-
requiresDependencyCollection
ResolutionScope requiresDependencyCollection
the required dependency collection scope.- Returns:
- the required dependency collection scope
- Default:
- org.apache.maven.plugins.annotations.ResolutionScope.NONE
-
-
-
instantiationStrategy
InstantiationStrategy instantiationStrategy
your Mojo instantiation strategy. (Onlyper-lookup
andsingleton
are supported)- Returns:
- the instantiation strategy
- Default:
- org.apache.maven.plugins.annotations.InstantiationStrategy.PER_LOOKUP
-
-
-
executionStrategy
String executionStrategy
execution strategy:once-per-session
oralways
.- Returns:
once-per-session
oralways
- Default:
- "once-per-session"
-
-
-
configurator
String configurator
own configurator class.- Returns:
- own configurator class
- Default:
- ""
-
-