Class GenerateSourcesMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
gov.nist.secauto.metaschema.maven.plugin.AbstractMetaschemaMojo
gov.nist.secauto.metaschema.maven.plugin.GenerateSourcesMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

@Mojo(name="generate-sources", defaultPhase=GENERATE_SOURCES) public class GenerateSourcesMojo extends AbstractMetaschemaMojo
Goal which generates Java source files for a given set of Metaschema modules.
  • Field Details

    • configs

      @Parameter protected File[] configs
      A set of binding configurations.
  • Constructor Details

  • Method Details

    • getStaleFileName

      protected String getStaleFileName()

      Gets the last part of the stale filename.

      The full stale filename will be generated by pre-pending "." + getExecution().getExecutionId() to this staleFileName.

      Specified by:
      getStaleFileName in class AbstractMetaschemaMojo
      Returns:
      the stale filename postfix
    • getConfigs

      protected List<File> getConfigs()
      Retrieve a list of binding configurations.
      Returns:
      the collection of binding configurations
    • generate

      protected void generate(@NonNull Set<IModule> modules) throws org.apache.maven.plugin.MojoExecutionException
      Generate the Java source files for the provided Metaschemas.
      Parameters:
      modules - the collection of Metaschema modules to generate sources for
      Throws:
      org.apache.maven.plugin.MojoExecutionException - if an error occurred while generating sources
    • execute

      public void execute() throws org.apache.maven.plugin.MojoExecutionException
      Throws:
      org.apache.maven.plugin.MojoExecutionException