From ab968494e6f35218e7068f1b9f14a24bcce383ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Nicoll?= Date: Mon, 30 Sep 2024 10:55:37 +0200 Subject: [PATCH] Document how to handle the manifest in a native image with Maven Closes gh-42412 --- .../spring-boot-maven-plugin/src/docs/asciidoc/aot.adoc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/aot.adoc b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/aot.adoc index adae86df7c4..531ad1df868 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/aot.adoc +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/aot.adoc @@ -37,6 +37,12 @@ The `native` profile configures the following: ** Validate that a suitable GraalVM version is available. ** Download third-party reachability metadata. +[WARNING] +==== +The use of the raw classpath means that native image does not know about the generated `MANIFEST`. +If you need to read the content of the manifest in a native image, for instance to get the implementation version of your application, configure the `classesDirectory` option to use the regular jar. +==== + To benefit from the `native` profile, a module that represents an application should define two plugins, as shown in the following example: [source,xml,indent=0,subs="verbatim,attributes",tabsize=4]