Class BuildMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
io.quarkus.maven.QuarkusBootstrapMojo
io.quarkus.maven.BuildMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
AbstractDeploymentMojo, AbstractImageMojo

@Mojo(name="build", defaultPhase=PACKAGE, requiresDependencyResolution=COMPILE_PLUS_RUNTIME, threadSafe=true) public class BuildMojo extends QuarkusBootstrapMojo
Builds the Quarkus application.
  • Field Details

    • projectHelper

      @Component org.apache.maven.project.MavenProjectHelper projectHelper
    • analyticsProvider

      @Component BuildAnalyticsProvider analyticsProvider
    • pluginRepos

      @Parameter(defaultValue="${project.remotePluginRepositories}", readonly=true, required=true) List<org.eclipse.aether.repository.RemoteRepository> pluginRepos
      The project's remote repositories to use for the resolution of plugins and their dependencies.
    • generatedSourcesDirectory

      @Parameter(defaultValue="${project.build.directory}/generated-sources") File generatedSourcesDirectory
      The directory for generated source files.
    • skip

      @Parameter(defaultValue="false", property="quarkus.build.skip") boolean skip
      Skips the execution of this mojo
    • skipOriginalJarRename

      @Deprecated @Parameter(property="skipOriginalJarRename") boolean skipOriginalJarRename
      Deprecated.
      When the building an Uber JAR, the default JAR is renamed by adding .original suffix. Enabling this property will disable the renaming of the original JAR.
    • attachRunnerAsMainArtifact

      @Parameter(property="attachRunnerAsMainArtifact", required=false) boolean attachRunnerAsMainArtifact
      Whether to replace the original JAR with the Uber runner JAR as the main project artifact
    • attachSboms

      @Parameter(property="attachSboms") boolean attachSboms
      Whether to attach SBOMs generated for Uber JARs as project artifacts
    • buildDirectory

      @Parameter(defaultValue="${project.build.directory}", readonly=true) File buildDirectory
    • systemProperties

      @Parameter Map<String,String> systemProperties
      The list of system properties defined for the plugin.
  • Constructor Details

    • BuildMojo

      public BuildMojo()
  • Method Details

    • beforeExecute

      protected boolean beforeExecute() throws org.apache.maven.plugin.MojoExecutionException
      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
    • doExecute

      protected void doExecute() throws org.apache.maven.plugin.MojoExecutionException
      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
    • setLog

      public void setLog(org.apache.maven.plugin.logging.Log log)
      Specified by:
      setLog in interface org.apache.maven.plugin.Mojo
      Overrides:
      setLog in class QuarkusBootstrapMojo