Plugin Documentation
This report describes goals, parameters details, requirements and sample usage of this plugin.
Goals
Goals available for this plugin:
Goal | Description |
---|---|
mn:aot-analysis | Invokes the Micronaut AOT optimizer, generating sources/classes and the effective AOT configuration properties file. Refer to the Micronaut AOT documentation for more information. WARNING: this goal is not intended to be executed directly. Instead, enable AOT with the mvn -Dmicronaut.aot.enabled=true package mvn -Dmicronaut.aot.enabled=true mn:run |
mn:aot-sample-config | Generates a sample aot.properties showcasing all the possible values along with a description. |
mn:docker | Allows using a provided Dockerfile. WARNING: this goal is not intended to be executed directly. Instead, specify the packaging type using the mvn package -Dpackaging=docker |
mn:docker-crac | Implementation of the WARNING: this goal is not intended to be executed directly. Instead, specify the packaging type using the mvn package -Dpackaging=docker-crac This is a two stage process. First a docker image is built that runs the application under a CRaC enabled JDK. Then the application is warmed up via a shell script. And then a checkpoint is taken via a signal using jcmd. The second stage takes this checkpoint, and creates the final image containing it plus a run script which passes the correct flags to the CRaC enabled JDK. |
mn:docker-native | Implementation of the WARNING: this goal is not intended to be executed directly. Instead, specify the packaging type using the mvn package -Dpackaging=docker-native |
mn:docker-push | Implementation of the WARNING: this goal is not intended to be executed directly. Instead, Execute the mvn deploy -Dpackaging=docker-native |
mn:dockerfile | Generates a mvn mn:dockerfile -Dpackaging=docker-native -Dmicronaut.runtime=lambda |
mn:generate-import-factory | Import beans from project dependencies by generating factories annotated with @Import containing the list of packages. |
mn:generate-openapi-client | Generates an OpenAPI client. The sources are generated in the target directory. |
mn:generate-openapi-generic | A generic OpenAPI mojo that will be used for configuring custom Micronaut OpenAPI generator extensions. |
mn:generate-openapi-server | Generates an OpenAPI server. The sources are generated in the target directory. |
mn:graalvm-resources |
Deprecated. Please use native:generateResourceConfig and/or native:generateTestResourceConfig instead. Generate GraalVM WARNING: this goal is not intended to be executed directly. |
mn:help | Display help information on micronaut-maven-plugin.
Call mvn mn:help -Ddetail=true -Dgoal=<goal-name> to display parameter details. |
mn:run | Executes a Micronaut application in development mode. It watches for changes in the project tree. If there are changes in the The plugin can handle changes in all the languages supported by Micronaut: Java, Kotlin and Groovy. |
mn:start-testresources-service | Starts the Micronaut test resources server. |
mn:stop-testresources-service | Stops the Micronaut test resources server. |
System Requirements
The following specifies the minimum requirements to run this Maven plugin:
Maven | 3.9.9 |
JDK | 17 |
System Requirements History
The following specifies the minimum requirements to run this Maven plugin for historical versions:
Plugin Version | Maven | JDK |
---|---|---|
from 4.0.0 to 4.7.1 | - | 17 |
Usage
You should specify the version in your project's plugin configuration:
<project> ... <build> <!-- To define the plugin version in your parent POM --> <pluginManagement> <plugins> <plugin> <groupId>io.micronaut.maven</groupId> <artifactId>micronaut-maven-plugin</artifactId> <version>4.7.2-SNAPSHOT</version> <extensions>true</extensions> </plugin> ... </plugins> </pluginManagement> <!-- To use the plugin goals in your POM or parent POM --> <plugins> <plugin> <groupId>io.micronaut.maven</groupId> <artifactId>micronaut-maven-plugin</artifactId> </plugin> ... </plugins> </build> ... </project>
For more information, see "Guide to Configuring Plug-ins"