Class AbstractGenerateSimpleResourceMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
io.micronaut.sourcegen.example.plugin.maven.AbstractGenerateSimpleResourceMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
GenerateSimpleResourceMojo

public abstract class AbstractGenerateSimpleResourceMojo extends org.apache.maven.plugin.AbstractMojo
This is a configuration for another plugin task run. In this case it is a resource instead of a record. The properties are parameters and the single method defines the task execution.
  • Field Details

    • PROPERTY_PREFIX

      protected static final String PROPERTY_PREFIX
      The common prefix for Mojo properties.
      See Also:
    • project

      @Parameter(defaultValue="${project}", required=true, readonly=true) protected org.apache.maven.project.MavenProject project
    • enabled

      @Parameter(property="test.generate.simple.resource.enabled", defaultValue="false") protected boolean enabled
      Determines if this mojo must be executed. The value is true if the mojo is enabled.
    • fileName

      @Parameter(required=true, property="test.generate.simple.resource.fileName") protected String fileName
      The generated file name.
    • content

      @Parameter(required=true, property="test.generate.simple.resource.content") protected String content
      The content of the file.
    • ending

      @Parameter(defaultValue="NONE") protected Ending ending
      How the file ends.
    • repeat

      @Parameter protected Repeat repeat
      Configure generating repeated file content.
  • Constructor Details

    • AbstractGenerateSimpleResourceMojo

      public AbstractGenerateSimpleResourceMojo()
  • Method Details

    • getOutputFolder

      protected abstract File getOutputFolder()
      The output folder.
    • setRepeatDefaults

      protected static Repeat setRepeatDefaults(Repeat value)
    • execute

      public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
      Generate a simple record in the supplied package and with the specified version. This javadoc will be copied to the respected plugin implementations.
      Throws:
      org.apache.maven.plugin.MojoExecutionException
      org.apache.maven.plugin.MojoFailureException