Class GenerateCodeMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
io.quarkus.maven.QuarkusBootstrapMojo
io.quarkus.maven.GenerateCodeMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
GenerateCodeTestsMojo, PrepareMojo

@Mojo(name="generate-code", defaultPhase=PROCESS_RESOURCES, requiresDependencyResolution=COMPILE_PLUS_RUNTIME, threadSafe=true) public class GenerateCodeMojo extends QuarkusBootstrapMojo
  • Field Details

    • skipSourceGeneration

      @Parameter(defaultValue="false", property="quarkus.generate-code.skip", alias="quarkus.prepare.skip") boolean skipSourceGeneration
      Skip the execution of this mojo
    • mode

      @Parameter(defaultValue="NORMAL", property="launchMode") String mode
      Application launch mode for which to generate the source code.
  • Constructor Details

    • GenerateCodeMojo

      public GenerateCodeMojo()
  • Method Details

    • beforeExecute

      protected boolean beforeExecute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
      Description copied from class: QuarkusBootstrapMojo
      This callback allows to evaluate whether this mojo should be executed, skipped or fail.
      Specified by:
      beforeExecute in class QuarkusBootstrapMojo
      Returns:
      false if the execution of the mojo should be skipped, true if the mojo should be executed
      Throws:
      org.apache.maven.plugin.MojoExecutionException - in case of a failure
      org.apache.maven.plugin.MojoFailureException - in case of a failure
    • doExecute

      protected void doExecute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
      Description copied from class: QuarkusBootstrapMojo
      Main mojo execution code
      Specified by:
      doExecute in class QuarkusBootstrapMojo
      Throws:
      org.apache.maven.plugin.MojoExecutionException - in case of a failure
      org.apache.maven.plugin.MojoFailureException - in case of a failure
    • generateCode

      void generateCode(io.quarkus.paths.PathCollection sourceParents, Consumer<Path> sourceRegistrar, boolean test) throws org.apache.maven.plugin.MojoExecutionException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
    • isSerializeTestModel

      protected boolean isSerializeTestModel()
    • getParentDirs

      protected io.quarkus.paths.PathCollection getParentDirs(List<String> sourceDirs)