diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/native-image/developing-your-first-application.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/native-image/developing-your-first-application.adoc index b0a383c1a92f..5fdaf06cc49a 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/native-image/developing-your-first-application.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/native-image/developing-your-first-application.adoc @@ -53,7 +53,7 @@ On Microsoft Windows, make sure to enable the https://docs.docker.com/docker-for [[native-image.developing-your-first-application.buildpacks.maven]] ==== Using Maven -To build a native image container using Maven you should ensure that your `pom.xml` file uses the `spring-boot-starter-parent`. +To build a native image container using Maven you should ensure that your `pom.xml` file uses the `spring-boot-starter-parent` and the `org.graalvm.buildtools:native-maven-plugin`. You should have a `` section that looks like this: [source,xml,indent=0,subs="verbatim,attributes"] @@ -65,6 +65,16 @@ You should have a `` section that looks like this: ---- +You additionally should have this in the ` ` section: + +[source,xml,indent=0,subs="verbatim,attributes"] +---- + + org.graalvm.buildtools + native-maven-plugin + +---- + The `spring-boot-starter-parent` declares a `native` profile that configures the executions that need to run in order to create a native image. You can activate profiles using the `-P` flag on the command line. @@ -181,7 +191,8 @@ Due to the https://docs.microsoft.com/en-US/troubleshoot/windows-client/shell-ex [[native-image.developing-your-first-application.native-build-tools.maven]] ==== Using Maven -As with the <>, you need to make sure that you're using `spring-boot-starter-parent` in order to inherit the `native` profile. + +As with the <>, you need to make sure that you're using `spring-boot-starter-parent` in order to inherit the `native` profile and that the `org.graalvm.buildtools:native-maven-plugin` plugin is used. With the `native` profile active, you can invoke the `native:compile` goal to trigger `native-image` compilation: