Class RunMojo

  • All Implemented Interfaces:
    org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

    @Mojo(name="run",
          requiresDependencyResolution=COMPILE_PLUS_RUNTIME,
          defaultPhase=PREPARE_PACKAGE)
    public class RunMojo
    extends org.apache.maven.plugin.AbstractMojo

    Executes a Micronaut application in development mode.

    It watches for changes in the project tree. If there are changes in the pom.xml file, dependencies will be reloaded. If the changes are anywhere underneath src/main, it will recompile the project and restart the application.

    The plugin can handle changes in all the languages supported by Micronaut: Java, Kotlin and Groovy.

    Since:
    1.0.0
    Author:
    Álvaro Sánchez-Mariscal
    • Field Summary

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

        ROLE
    • Constructor Summary

      Constructors 
      Constructor Description
      RunMojo​(org.apache.maven.project.MavenProject mavenProject, org.apache.maven.execution.MavenSession mavenSession, org.apache.maven.plugin.BuildPluginManager pluginManager, org.apache.maven.project.ProjectDependenciesResolver resolver, org.apache.maven.project.ProjectBuilder projectBuilder, org.apache.maven.toolchain.ToolchainManager toolchainManager, CompilerService compilerService, ExecutorService executorService)  
    • Constructor Detail

      • RunMojo

        @Inject
        public RunMojo​(org.apache.maven.project.MavenProject mavenProject,
                       org.apache.maven.execution.MavenSession mavenSession,
                       org.apache.maven.plugin.BuildPluginManager pluginManager,
                       org.apache.maven.project.ProjectDependenciesResolver resolver,
                       org.apache.maven.project.ProjectBuilder projectBuilder,
                       org.apache.maven.toolchain.ToolchainManager toolchainManager,
                       CompilerService compilerService,
                       ExecutorService executorService)
    • Method Detail

      • execute

        public void execute()
                     throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException