Class WurbileMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.wurbelizer.maven.AbstractWurbelizerMojo
org.wurbelizer.maven.WurbileMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

@Mojo(name="wurbile", defaultPhase=GENERATE_SOURCES, threadSafe=true) public class WurbileMojo extends AbstractWurbelizerMojo
Wurbile Wurblets.
The wurblet sources (wrbl-files) are translated to Java sources and ser-files (serialized fixed text). The directory of the generated Java sources is added as a compile source root, so that they are compiled to class files in the compile phase.
The Wurbler can later instantiate those class files as code generators.
See the wurbelizer:wurbel goal.
Author:
harald
  • Field Details

    • totalErrors

      protected int totalErrors
      Total number of errors
  • Constructor Details

    • WurbileMojo

      public WurbileMojo()
  • Method Details

    • doExecute

      protected void doExecute(WurbelContext context) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
      Description copied from class: AbstractWurbelizerMojo
      Executes the mojo within the given wurbel context.
      Specified by:
      doExecute in class AbstractWurbelizerMojo
      Parameters:
      context - the wurbel context bound to the current thread
      Throws:
      org.apache.maven.plugin.MojoExecutionException - if an unexpected problem occurs
      org.apache.maven.plugin.MojoFailureException - if an expected problem occurs
    • createWurbiler

      protected Wurbiler createWurbiler(File wrblFile, File outputJavaDir, File outputTextDir, Logger logger, Verbosity verbosity) throws IOException
      Creates an instance of a wurbiler.
      Parameters:
      wrblFile - the input wurbelizer file
      outputJavaDir - the output directory getting the Java files
      outputTextDir - the output directory getting the fixed text .ser-files.
      logger - the logger
      verbosity - the verbosity
      Returns:
      the wurbiler
      Throws:
      IOException - if the source file could not be loaded