Class AbstractGenerateSimpleRecordMojo

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

public abstract class AbstractGenerateSimpleRecordMojo extends org.apache.maven.plugin.AbstractMojo
This is a configuration for a plugin task run. The properties are parameters and the single method defines the task execution. The plugin generates a simple record.
  • Field Details

    • project

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

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

      @Parameter(required=true, property="test.generate.simple.record.type.name") protected String typeName
      The generated class name.
    • version

      @Parameter(defaultValue="1", property="test.generate.simple.record.version") protected Integer version
      The version.
    • packageName

      @Parameter(defaultValue="com.example", property="test.generate.simple.record.package.name") protected String packageName
      The package name.
    • properties

      @Parameter protected Map<String,String> properties
      The properties.
    • javadoc

      @Parameter protected List<String> javadoc
      The javadoc.
  • Constructor Details

    • AbstractGenerateSimpleRecordMojo

      public AbstractGenerateSimpleRecordMojo()
  • Method Details

    • getOutputFolder

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

      public void execute()
      Generate a simple record in the supplied package and with the specified version. This javadoc will be copied to the respected plugin implementations.