Class DevMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
io.quarkus.maven.DevMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
RemoteDevMojo, TestMojo

@Mojo(name="dev", defaultPhase=PREPARE_PACKAGE, requiresDependencyResolution=TEST, threadSafe=true) public class DevMojo extends org.apache.maven.plugin.AbstractMojo
The dev mojo, that runs a quarkus app in a forked process. A background compilation process is launched and any changes are automatically reflected in your running application.

You can use this dev mode in a remote container environment with remote-dev.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) BuildAnalyticsProvider
     
     
    (package private) io.quarkus.deployment.dev.ExtensionDevModeJvmOptionFilter
    Extension dev mode JVM option filter configuration.
    (package private) org.apache.maven.plugin.MojoExecution
     
    protected org.apache.maven.project.MavenProject
     
    (package private) Set<String>
    A comma-separated list of Maven plugin keys in groupId:artifactId format (for example org.codehaus.mojo:flatten-maven-plugin and/or goal prefixes, (for example flatten) that should be skipped when quarkus:dev identifies Maven plugin goals that should be executed before the application is launched in dev mode.
    (package private) String
    Selects given test(s) for continuous testing.
    (package private) boolean
     
    (package private) QuarkusWorkspaceProvider
     

    Fields inherited from interface org.apache.maven.plugin.Mojo

    ROLE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    protected io.quarkus.runtime.LaunchMode
    Indicates for which launch mode the dependencies should be resolved.
    protected void
    modifyDevModeContext(io.quarkus.deployment.dev.DevModeCommandLineBuilder builder)
     
    void
    setLog(org.apache.maven.plugin.logging.Log log)
     

    Methods inherited from class org.apache.maven.plugin.AbstractMojo

    getLog, getPluginContext, setPluginContext

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • project

      @Parameter(defaultValue="${project}", readonly=true, required=true) protected org.apache.maven.project.MavenProject project
    • workspaceProvider

      @Component QuarkusWorkspaceProvider workspaceProvider
    • warnIfBuildGoalMissing

      @Parameter(property="quarkus.warnIfBuildGoalMissing") boolean warnIfBuildGoalMissing
    • bootstrapProvider

      @Component protected QuarkusBootstrapProvider bootstrapProvider
    • mojoExecution

      @Parameter(defaultValue="${mojoExecution}", readonly=true, required=true) org.apache.maven.plugin.MojoExecution mojoExecution
    • analyticsProvider

      @Component BuildAnalyticsProvider analyticsProvider
    • skipPlugins

      @Parameter(defaultValue="org.codehaus.mojo:flatten-maven-plugin") Set<String> skipPlugins
      A comma-separated list of Maven plugin keys in groupId:artifactId format (for example org.codehaus.mojo:flatten-maven-plugin and/or goal prefixes, (for example flatten) that should be skipped when quarkus:dev identifies Maven plugin goals that should be executed before the application is launched in dev mode.

      Only the flatten Maven plugin is skipped by default.

    • extensionJvmOptions

      @Parameter io.quarkus.deployment.dev.ExtensionDevModeJvmOptionFilter extensionJvmOptions
      Extension dev mode JVM option filter configuration.

      Allows disabling all JVM options configured by extensions, for example

      
           <extensionJvmOptions>
               <!-- disable JVM options from all the extensions -->
               <disableAll>true</disableAll>
           </extensionJvmOptions>*
       
      or specifying a groupId:artifactId:classifier artifact pattern to disable options provided by the matching subset of extensions, for example
      
           <extensionJvmOptions>
               <disableFor>
                   <!-- disable JVM options from all the extensions with groupId org.acme -->
                   <extension>org.acme</extension>
                   <!-- disable JVM options configured by io.quarkiverse:quarkus-magic -->
                   <extension>io.quarkiverse:quarkus-magic</extension>
               </disableFor>
           </extensionJvmOptions>
       
    • test

      @Parameter(property="test") String test
      Selects given test(s) for continuous testing. This is an alternative to quarkus.test.include-pattern and quarkus.test.exclude-pattern; if set, the quarkus.test.[include|exclude]-pattern configuration is ignored.

      The format of this configuration property is the same as the Maven Surefire -Dtest=... format. Specifically: it is a comma (,) separated list of globs of class file paths and/or method names. Each glob can potentially be prefixed with an exclamation mark (!), which makes it an exclusion filter instead of an inclusion filter. Exclusions have higher priority than inclusions. The class file path glob is separated from the method name glob by the hash sign (#) and multiple method name globs may be present, separated by the plus sign (+).

      For example:

      • Basic*: all classes starting with Basic
      • ???Test: all classes named with 3 arbitrary characters followed by Test
      • !Unstable*: all classes except classes starting with Unstable
      • pkg/**/Ci*leTest: all classes in the package pkg and subpackages, starting with Ci and ending with leTest
      • *Test#test*One+testTwo?????: all classes ending with Test, and in them, only methods starting with test and ending with One, or starting with testTwo and followed by 5 arbitrary characters
      • #fast*+slowTest: all classes, and in them, only methods starting with fast or methods named slowTest
      Note that the syntax %regex[...] and %ant[...] is NOT supported.
  • Constructor Details

    • DevMojo

      public DevMojo()
  • Method Details

    • getLaunchModeClasspath

      protected io.quarkus.runtime.LaunchMode getLaunchModeClasspath()
      Indicates for which launch mode the dependencies should be resolved.
      Returns:
      launch mode for which the dependencies should be resolved
    • 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 org.apache.maven.plugin.AbstractMojo
    • execute

      public void execute() throws org.apache.maven.plugin.MojoFailureException, org.apache.maven.plugin.MojoExecutionException
      Throws:
      org.apache.maven.plugin.MojoFailureException
      org.apache.maven.plugin.MojoExecutionException
    • modifyDevModeContext

      protected void modifyDevModeContext(io.quarkus.deployment.dev.DevModeCommandLineBuilder builder)