org.appng.maven.plugin.mojo

## Class GenerateMessageConstantsMojo

- java.lang.Object
- - org.apache.maven.plugin.AbstractMojo
  - - org.appng.maven.plugin.mojo.GenerateMessageConstantsMojo

- All Implemented Interfaces:
    org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

      @Mojo(name="generateMessageConstants",
            defaultPhase=GENERATE_SOURCES,
            requiresDependencyResolution=COMPILE,
            requiresProject=true)
      public class GenerateMessageConstantsMojo
      extends org.apache.maven.plugin.AbstractMojo

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected org.sonatype.plexus.build.incremental.BuildContext` | `buildContext`
    `protected File` | `filePath` the path to the source file
    `protected File` | `outfolder` the output-folder for the generated class
    `protected boolean` | `skip` skips the execution
    `protected String` | `targetClass` the fully qualified name of the target class to generate

    - ### Fields inherited from interface org.apache.maven.plugin.Mojo

      `ROLE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GenerateMessageConstantsMojo()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `createConstantClass()`
    `void` | `execute()`
    `protected String[]` | `getArgs()`
    `protected String` | `getMessage()`
    `protected boolean` | `needsToBeExecuted()`

    - ### Methods inherited from class org.apache.maven.plugin.AbstractMojo

      `getLog, getPluginContext, setLog, setPluginContext`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### targetClass

          @Parameter(property="targetClass",
                     required=true)
          protected String targetClass

      the fully qualified name of the target class to generate

    - #### filePath

          @Parameter(property="filePath",
                     required=true)
          protected File filePath

      the path to the source file

    - #### outfolder

          @Parameter(property="outFolder",
                     defaultValue="target/generated-sources/constants",
                     required=false)
          protected File outfolder

      the output-folder for the generated class

    - #### skip

          @Parameter(property="skip",
                     defaultValue="false",
                     required=false)
          protected boolean skip

      skips the execution

    - #### buildContext

          @Component
          protected org.sonatype.plexus.build.incremental.BuildContext buildContext

  - ### Constructor Detail

    - #### GenerateMessageConstantsMojo

          public GenerateMessageConstantsMojo()

  - ### Method Detail

    - #### createConstantClass

          protected void createConstantClass()
                                      throws IOException

      Throws:
        `IOException`

    - #### getMessage

          protected String getMessage()

    - #### getArgs

          protected String[] getArgs()

    - #### execute

          public void execute()
                       throws org.apache.maven.plugin.MojoExecutionException,
                              org.apache.maven.plugin.MojoFailureException

      Throws:
        `org.apache.maven.plugin.MojoExecutionException`
        `org.apache.maven.plugin.MojoFailureException`

    - #### needsToBeExecuted

          protected boolean needsToBeExecuted()

Copyright © 2011–2023 aiticon GmbH. All rights reserved.