Class 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 Module definitions.
    • Field Detail

      • configs

        @Parameter
        protected File[] configs
        A set of binding configurations.
    • Method Detail

      • 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<FilegetConfigs()
        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