Annotation Type MojoTest
-
@Retention(RUNTIME) @ExtendWith(MojoExtension.class) @Target(TYPE) public @interface MojoTest
Annotation that enables Maven plugin (Mojo) testing support in JUnit tests. When applied to a test class, it automatically sets up the testing environment for Maven plugins, including dependency injection and parameter resolution.This annotation works in conjunction with
InjectMojoandMojoParameterto provide a comprehensive testing framework for Maven plugins. It automatically registers theMojoExtensionwhich handles the plugin lifecycle and dependency injection.Example usage:
{@code- Since:
- 4.0.0
- See Also:
MojoExtension,InjectMojo,MojoParameter,Provides
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description booleanrealRepositorySessionIndicates whether to use a real repository session for the test.
-