Annotation Type MojoParameter


  • @Retention(RUNTIME)
    @Repeatable(MojoParameters.class)
    @Inherited
    @Target({TYPE,METHOD,PARAMETER})
    public @interface MojoParameter
    Specifies a parameter value for a Mojo in a Maven plugin test. This annotation can be used to configure individual Mojo parameters without requiring a full POM file.

    The annotation is repeatable, allowing multiple parameters to be set on a single test method, parameter, or on the whole test class. For multiple parameters, you can either use multiple @MojoParameter annotations or a single MojoParameters annotation.

    Example usage with a single parameter:

     {@code
    Since:
    3.4.0
    See Also:
    MojoParameters, InjectMojo, MojoTest
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      java.lang.String name  
      java.lang.String value  
    • Element Detail

      • name

        java.lang.String name
      • value

        java.lang.String value