Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions docs/src/docs/asciidoc/maven-plugin.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,19 @@ The following configuration options are available:
----
<skipNativeBuild>true</skipNativeBuild>
----
`<skipNativeBuildForPom>`::
To skip generation of the native image only for Maven projects with `pom` packaging, use

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we infer this from the project?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The plugin already infers pom packaging when this option is enabled. We keep it opt-in because packaging alone does not tell us whether a project is intended to build a native image: a POM project can still provide an explicit classpath and main class.

Without this option, users need to avoid inheriting the native execution into the aggregator—for example, put it separately in every application module, or keep configuration in pluginManagement and add executions in each leaf. That is more verbose and easier to misconfigure in a larger reactor.

skipNativeBuildForPom is therefore a convenience for shared native-plugin configuration: it skips the aggregator execution while application modules continue to build normally.

`<skipNativeBuildForPom>`. This option defaults to `false` for compatibility. It is useful in
multi-module builds where a parent aggregator POM shares the native profile or plugin
configuration with child modules but does not contain the application main class. Enabling this
option prevents native image generation in the aggregator project while still allowing
application modules to build their native images. It does not select the application module
automatically; configure or run the native build in the module that owns the main class. To
enable it, add:
[source,xml, role="multi-language-sample"]
----
<skipNativeBuildForPom>true</skipNativeBuildForPom>
----
`<skipNativeTests>`::
To skip generation and execution of the native image compiled tests, add:
[source,xml, role="multi-language-sample"]
Expand Down