Skip to content

micronaut-projects/micronaut-maven-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1,734 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Micronaut Maven Plugin

Maven Central Build Status Quality Gate Status Revved up by Develocity

Maven plugin to execute Micronaut applications.

Documentation

See the Documentation for more information.

See the Snapshot Documentation for the current development docs.

To see the documentation of a particular version, replace latest or snapshot in the above URLs with the version string.

Snapshots and Releases

Snapshots and releases are automatically published to Maven Central using GitHub Actions.

A release is performed with the following steps:

Contributing tips and tricks

Bootstrapping the toolchain

This repository's root validation and verify commands expect Java 25. The repo includes a .sdkmanrc, but shared shells may still start on an older JDK until you apply it.

If you use SDKMAN!, run this from the repository root before ./mvnw ... commands:

sdk env
java -version

If you do not use SDKMAN!, set JAVA_HOME to a Java 25 installation before running the same commands.

Running integration tests

Run the wrapper so you inherit the repo's Maven configuration:

./mvnw verify

If you want to run individual tests, you can execute ./mvnw verify "-Dinvoker.test=dockerfile*". In this case, dockerfile* will match all test projects under src/it folder with a name that starts with "dockerfile".

Windows-sensitive preflight

If your change touches GitHub Actions workflows, .github/scripts, .mvn/wrapper, mvnw, or mvnw.cmd, start with the repo-owned CI-sensitive preflight wrapper before review handoff:

bash .github/scripts/ci-sensitive-preflight.sh

The wrapper always runs workflow pinning locally. In a Windows shell that exposes cmd.exe, it also dispatches the lightweight wrapper/bootstrap validation automatically.

If you want to run the Windows-specific step directly, execute:

.\.github\scripts\windows-preflight.cmd

If you want to run the workflow pinning step directly, execute:

bash .github/scripts/check-workflow-pinning.sh

If you do not have a Windows shell locally, the wrapper will remind you to open a draft PR or run the Windows Preflight workflow manually to get the same wrapper/bootstrap check on windows-latest without waiting for the full Windows CI job.

Debugging

To debug the plugin, you first need to publish a snapshot to your Maven local:

./mvnw install

You can skip execution of integration tests by adding -Dinvoker.skip=true to the command line.

Then you need a sample application. The one at examples/java is the most up-to-date, but you can in principle generate a new one from Micronaut Starter. Then, change its pom.xml to set the following property, using the snapshot version you published locally. For branch-specific examples and current documentation, refer to the Snapshot Documentation link above:

<micronaut-maven-plugin.version>X.Y.Z-SNAPSHOT</micronaut-maven-plugin.version>

Pointing to whatever snapshot version you published before.

Finally, from the sample application folder, run the Maven goal you are interested into with mvnDebug instead of mvn:

mvnDebug package -Dpackaging=docker

Then in your IDE, attach a remote debugger to port 8000.

Preparing for a new minor/major version

./mvnw release:update-versions -DautoVersionSubmodules=true -DdevelopmentVersion=X.Y.Z-SNAPSHOT

About

Maven plugin to execute Micronaut applications

Topics

Resources

License

Security policy

Stars

26 stars

Watchers

12 watching

Forks

Packages

 
 
 

Contributors