mn:run

Full name:

io.micronaut.build:micronaut-maven-plugin:1.1.6:run

Description:

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.

Attributes:

  • Requires a Maven project to be executed.
  • Requires dependency resolution of artifacts in scope: compile+runtime.
  • Since version: 1.0.0.
  • Binds by default to the lifecycle phase: prepare-package.

Required Parameters

Name Type Since Description
<mainClass> String 1.0.0 The main class of the application, as defined in the Exec Maven Plugin.
Default value is: ${exec.mainClass}.

Optional Parameters

Name Type Since Description
<appArguments> List 1.0.0 List of additional arguments that will be passed to the application, after the class name.
User property is: mn.appArgs.
<debug> boolean 1.0.0 Whether to start the Micronaut application in debug mode.
Default value is: false.
User property is: mn.debug.
<debugHost> String 1.0.0 The host where remote debuggers can connect.
Default value is: 127.0.0.1.
User property is: mn.debug.host.
<debugPort> int 1.0.0 The port where remote debuggers can be attached to.
Default value is: 5005.
User property is: mn.debug.port.
<debugSuspend> boolean 1.0.0 Whether to suspend the execution of the application when running in debug mode.
Default value is: false.
User property is: mn.debug.suspend.
<jvmArguments> List 1.0.0

List of additional arguments that will be passed to the JVM process, such as Java agent properties.

When using the command line, user properties will be passed through, eg: mnv mn:run -Dmicronaut.environments=dev.


User property is: mn.jvmArgs.
<targetDirectory> File 1.0.0 The project's target directory.
Default value is: ${project.build.directory}.
<watchForChanges> boolean 1.0.0 Whether to watch for changes, or finish the execution after the first run.
Default value is: true.
User property is: mn.watch.
<watches> List 1.0.0 List of inclusion/exclusion paths that should not trigger an application restart. Check the FileSet documentation for more details.

Parameter Details

<appArguments>

List of additional arguments that will be passed to the application, after the class name.
  • Type: java.util.List
  • Since: 1.0.0
  • Required: No
  • User Property: mn.appArgs

<debug>

Whether to start the Micronaut application in debug mode.
  • Type: boolean
  • Since: 1.0.0
  • Required: No
  • User Property: mn.debug
  • Default: false

<debugHost>

The host where remote debuggers can connect.
  • Type: java.lang.String
  • Since: 1.0.0
  • Required: No
  • User Property: mn.debug.host
  • Default: 127.0.0.1

<debugPort>

The port where remote debuggers can be attached to.
  • Type: int
  • Since: 1.0.0
  • Required: No
  • User Property: mn.debug.port
  • Default: 5005

<debugSuspend>

Whether to suspend the execution of the application when running in debug mode.
  • Type: boolean
  • Since: 1.0.0
  • Required: No
  • User Property: mn.debug.suspend
  • Default: false

<jvmArguments>

List of additional arguments that will be passed to the JVM process, such as Java agent properties.

When using the command line, user properties will be passed through, eg: mnv mn:run -Dmicronaut.environments=dev.

  • Type: java.util.List
  • Since: 1.0.0
  • Required: No
  • User Property: mn.jvmArgs

<mainClass>

The main class of the application, as defined in the Exec Maven Plugin.
  • Type: java.lang.String
  • Since: 1.0.0
  • Required: Yes
  • Default: ${exec.mainClass}

<targetDirectory>

The project's target directory.
  • Type: java.io.File
  • Since: 1.0.0
  • Required: No
  • Default: ${project.build.directory}

<watchForChanges>

Whether to watch for changes, or finish the execution after the first run.
  • Type: boolean
  • Since: 1.0.0
  • Required: No
  • User Property: mn.watch
  • Default: true

<watches>

List of inclusion/exclusion paths that should not trigger an application restart. Check the FileSet documentation for more details.
  • Type: java.util.List
  • Since: 1.0.0
  • Required: No