Skip to content

Deprecate fallback plugin options - #997

Merged
jvukicev merged 4 commits into
masterfrom
rhei/issue-991
Aug 4, 2026
Merged

Deprecate fallback plugin options#997
jvukicev merged 4 commits into
masterfrom
rhei/issue-991

Conversation

@jvukicev

@jvukicev jvukicev commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

What changed

The Gradle fallback DSL option and Maven <fallback> parameter are now marked deprecated. Both remain available for compatibility.

The plugins now distinguish the GraalVM release from the JDK version reported by native-image --version:

  • Before GraalVM 25.1, disabling fallback continues to generate --no-fallback.
  • On positively identified GraalVM 25.1+ releases, the plugins omit the generated --no-fallback flag.
  • Runtime-environment lines are parsed independently of vendor labels, covering Oracle GraalVM, Mandrel, and BellSoft Liberica NIK formats.
  • If the GraalVM release cannot be identified, the plugins conservatively retain the flag.
  • Explicit user-supplied --no-fallback build arguments remain unchanged.

Why

Native Image removed the fallback feature in GraalVM 25.1, so --no-fallback is deprecated and has no effect there. Suppressing the plugin-generated flag avoids a deprecation warning on every build while preserving behavior for older GraalVM releases.

Both GraalVM 25.0 and 25.1 use JDK 25, so the existing JDK-major check cannot distinguish them. The implementation reads the first dotted release from a runtime-environment line in the existing native-image --version output, regardless of the distribution's vendor label, and does not add another version-check process.

Example

Existing configurations continue to work while showing the deprecation in API documentation:

nativeImage {
    fallback = false // deprecated on GraalVM 25.1+
}
<configuration>
  <fallback>false</fallback> <!-- deprecated on GraalVM 25.1+ -->
</configuration>

Implementation summary

  • Added deprecation annotations and GraalVM 25.1 guidance to the Gradle and Maven option surfaces.
  • Added shared, vendor-neutral GraalVM release detection independent of the JDK version.
  • Suppressed plugin-generated --no-fallback on confirmed GraalVM 25.1+ releases in both plugins.
  • Preserved compatibility behavior for older and unrecognized releases and preserved explicit build arguments.
  • Updated the common, Gradle, and Maven functional specs.
  • Added exact Oracle GraalVM, Mandrel, and BellSoft Liberica NIK parser fixtures, including same-format 25.1 cases.
  • Added Gradle/Maven command-line regression tests.

Validation

  • grund check
  • grund fmt . --marker --cross-refs --check
  • ./gradlew :utils:check
  • Focused Gradle and Maven argument regression tests
  • Maven invocation functional test against real Oracle GraalVM 25.0.3, Mandrel 25.0.3.0-Final, and BellSoft Liberica NIK 25.0.3-2 installations
  • Verified real current outputs are identified as pre-25.1 and same-format 25.1 transformations are identified as 25.1+ for all three distributions
  • ./gradlew :native-gradle-plugin:inspections :native-maven-plugin:inspections :utils:check
  • git diff --check
  • A complete Maven unit run was attempted for the original deprecation change; it has one unrelated reproducible NativeExtensionTest failure because this environment lacks a Spock class-mocking backend. The changed Maven tests and module inspections passed.

Fixes #991

@oracle-contributor-agreement oracle-contributor-agreement Bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jul 22, 2026
@jvukicev jvukicev added the rhei label Jul 22, 2026
@jvukicev
jvukicev marked this pull request as ready for review July 22, 2026 07:01
@vjovanov
vjovanov requested a review from fniephaus July 22, 2026 08:21
@vjovanov

Copy link
Copy Markdown
Member

I would test this with Mandrel and Bellsoft distributions.

@vjovanov
vjovanov requested a review from wirthi July 22, 2026 08:24
@jvukicev

Copy link
Copy Markdown
Contributor Author

@vjovanov Thanks for the suggestion. Adding Mandrel and Liberica NIK as permanent CI dimensions would significantly increase the number and cost of CI jobs, so I tested them locally instead.

I tested the parser and Maven command invocation against actual installations of:

  • Oracle GraalVM 25.0.3
  • Mandrel 25.0.3.0-Final
  • BellSoft Liberica NIK 25.0.3-2

Mandrel uses OpenJDK Runtime Environment ..., whereas Oracle GraalVM and Liberica NIK use GraalVM Runtime Environment .... I loosened the parser to recognize the first dotted release on any Runtime Environment line, independently of the vendor label, and added the exact outputs as regression-test fixtures.

I also tested same-format 25.1 variants for all three distributions. Assuming they retain their current output structure, they are recognized as 25.1+ and the plugin-generated --no-fallback is omitted.

An unknown distribution using a different version-output structure remains conservative: it will retain --no-fallback, even on 25.1. The build should still work because the option remains accepted as deprecated and without effect, but it may print the deprecation warning.

We could avoid the version-specific omission entirely if this approach is considered too heuristic, but then builds using the default disabled-fallback configuration would print the --no-fallback deprecation warning on every GraalVM 25.1 build. I think the current conservative approach gives us the better tradeoff.

@vjovanov

Copy link
Copy Markdown
Member

No need to add to the CI, just test. Excellent!

@fniephaus

Copy link
Copy Markdown
Member

Pinging @zakkak for Mandrel/Quarkus and @AlexanderScherbatiy for NIK/Bellsoft.

@fniephaus fniephaus left a comment

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.

LGTM

@jvukicev
jvukicev merged commit 158d8e9 into master Aug 4, 2026
51 checks passed
@jvukicev
jvukicev deleted the rhei/issue-991 branch August 4, 2026 07:06
mergify Bot added a commit to ArcadeData/arcadedb that referenced this pull request Aug 9, 2026
â€Ķ.7 to 1.1.8 [skip ci]

Bumps [org.graalvm.buildtools:native-maven-plugin](https://github.com/graalvm/native-build-tools) from 1.1.7 to 1.1.8.
Release notes

*Sourced from [org.graalvm.buildtools:native-maven-plugin's releases](https://github.com/graalvm/native-build-tools/releases).*

> 1.1.8
> -----
>
> What's Changed
> --------------
>
> * Release 1.1.7 by [`@​graalvmbot`](https://github.com/graalvmbot) in [graalvm/native-build-tools#1009](https://redirect.github.com/graalvm/native-build-tools/pull/1009)
> * Bump version to 1.1.8-SNAPSHOT by [`@​graalvmbot`](https://github.com/graalvmbot) in [graalvm/native-build-tools#1010](https://redirect.github.com/graalvm/native-build-tools/pull/1010)
> * Deprecate fallback plugin options by [`@​jormundur00`](https://github.com/jormundur00) in [graalvm/native-build-tools#997](https://redirect.github.com/graalvm/native-build-tools/pull/997)
> * Update reachability metadata to 1.0.9 by [`@​graalvmbot`](https://github.com/graalvmbot) in [graalvm/native-build-tools#1014](https://redirect.github.com/graalvm/native-build-tools/pull/1014)
>
> **Full Changelog**: <graalvm/native-build-tools@1.1.7...1.1.8>


Commits

* [`17ca0cf`](graalvm/native-build-tools@17ca0cf) Release 1.1.8
* [`bfbc8b8`](graalvm/native-build-tools@bfbc8b8) Merge pull request [#1014](https://redirect.github.com/graalvm/native-build-tools/issues/1014) from graalvm/update-metadata-to-1.0.9
* [`8f6b4d3`](graalvm/native-build-tools@8f6b4d3) Update reachability metadata to 1.0.9
* [`158d8e9`](graalvm/native-build-tools@158d8e9) Deprecate fallback plugin options ([#997](https://redirect.github.com/graalvm/native-build-tools/issues/997))
* [`f3f7aad`](graalvm/native-build-tools@f3f7aad) Bump version to 1.1.8-SNAPSHOT ([#1010](https://redirect.github.com/graalvm/native-build-tools/issues/1010))
* [`d7a469b`](graalvm/native-build-tools@d7a469b) Merge pull request [#1009](https://redirect.github.com/graalvm/native-build-tools/issues/1009) from graalvm/release/1.1.7
* See full diff in [compare view](graalvm/native-build-tools@1.1.7...1.1.8)
  
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility\_score?dependency-name=org.graalvm.buildtools:native-maven-plugin&package-manager=maven&previous-version=1.1.7&new-version=1.1.8)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
Dependabot commands and options
  
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot show  ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
mergify Bot added a commit to robfrank/linklift that referenced this pull request Aug 20, 2026
â€Ķ.6 to 1.1.9 [skip ci]

Bumps [org.graalvm.buildtools:native-maven-plugin](https://github.com/graalvm/native-build-tools) from 1.1.6 to 1.1.9.
Release notes

*Sourced from [org.graalvm.buildtools:native-maven-plugin's releases](https://github.com/graalvm/native-build-tools/releases).*

> 1.1.9
> -----
>
> What's Changed
> --------------
>
> * Make repository test output concise by default by [`@​jormundur00`](https://github.com/jormundur00) in [graalvm/native-build-tools#1004](https://redirect.github.com/graalvm/native-build-tools/pull/1004)
> * Decouple Maven plugin unit tests from remote bootstrap tasks by [`@​jormundur00`](https://github.com/jormundur00) in [graalvm/native-build-tools#1007](https://redirect.github.com/graalvm/native-build-tools/pull/1007)
> * Clarify build prerequisites and add a core build mode by [`@​jormundur00`](https://github.com/jormundur00) in [graalvm/native-build-tools#1012](https://redirect.github.com/graalvm/native-build-tools/pull/1012)
> * Release 1.1.8 by [`@​graalvmbot`](https://github.com/graalvmbot) in [graalvm/native-build-tools#1015](https://redirect.github.com/graalvm/native-build-tools/pull/1015)
> * Bump version to 1.1.9-SNAPSHOT by [`@​graalvmbot`](https://github.com/graalvmbot) in [graalvm/native-build-tools#1016](https://redirect.github.com/graalvm/native-build-tools/pull/1016)
> * Uplift the Native Image layer configuration model by [`@​jormundur00`](https://github.com/jormundur00) in [graalvm/native-build-tools#1011](https://redirect.github.com/graalvm/native-build-tools/pull/1011)
> * Update reachability metadata to 1.0.10 by [`@​graalvmbot`](https://github.com/graalvmbot) in [graalvm/native-build-tools#1021](https://redirect.github.com/graalvm/native-build-tools/pull/1021)
>
> **Full Changelog**: <graalvm/native-build-tools@1.1.8...1.1.9>
>
> 1.1.8
> -----
>
> What's Changed
> --------------
>
> * Release 1.1.7 by [`@​graalvmbot`](https://github.com/graalvmbot) in [graalvm/native-build-tools#1009](https://redirect.github.com/graalvm/native-build-tools/pull/1009)
> * Bump version to 1.1.8-SNAPSHOT by [`@​graalvmbot`](https://github.com/graalvmbot) in [graalvm/native-build-tools#1010](https://redirect.github.com/graalvm/native-build-tools/pull/1010)
> * Deprecate fallback plugin options by [`@​jormundur00`](https://github.com/jormundur00) in [graalvm/native-build-tools#997](https://redirect.github.com/graalvm/native-build-tools/pull/997)
> * Update reachability metadata to 1.0.9 by [`@​graalvmbot`](https://github.com/graalvmbot) in [graalvm/native-build-tools#1014](https://redirect.github.com/graalvm/native-build-tools/pull/1014)
>
> **Full Changelog**: <graalvm/native-build-tools@1.1.7...1.1.8>
>
> 1.1.7
> -----
>
> What's Changed
> --------------
>
> * Release 1.1.6 by [`@​graalvmbot`](https://github.com/graalvmbot) in [graalvm/native-build-tools#996](https://redirect.github.com/graalvm/native-build-tools/pull/996)
> * Suppress missing Javadoc diagnostics across convention tasks by [`@​jormundur00`](https://github.com/jormundur00) in [graalvm/native-build-tools#994](https://redirect.github.com/graalvm/native-build-tools/pull/994)
> * Replace deprecated Kotlin DSL delegated accessors by [`@​jormundur00`](https://github.com/jormundur00) in [graalvm/native-build-tools#998](https://redirect.github.com/graalvm/native-build-tools/pull/998)
> * Fix Maven plugin unit-test mock maker and SLF4J setup by [`@​jormundur00`](https://github.com/jormundur00) in [graalvm/native-build-tools#999](https://redirect.github.com/graalvm/native-build-tools/pull/999)
> * Bump version to 1.1.7-SNAPSHOT by [`@​graalvmbot`](https://github.com/graalvmbot) in [graalvm/native-build-tools#1001](https://redirect.github.com/graalvm/native-build-tools/pull/1001)
> * Bump io.netty:netty-codec-http from 4.1.135.Final to 4.1.136.Final in /samples/metadata-repo-integration by [`@​dependabot`](https://github.com/dependabot)[bot] in [graalvm/native-build-tools#1002](https://redirect.github.com/graalvm/native-build-tools/pull/1002)
> * Avoid Maven internal API for console colors by [`@​jormundur00`](https://github.com/jormundur00) in [graalvm/native-build-tools#1003](https://redirect.github.com/graalvm/native-build-tools/pull/1003)
> * Update reachability metadata to 1.0.8 by [`@​graalvmbot`](https://github.com/graalvmbot) in [graalvm/native-build-tools#1008](https://redirect.github.com/graalvm/native-build-tools/pull/1008)
>
> **Full Changelog**: <graalvm/native-build-tools@1.1.6...1.1.7>


Commits

* [`70a22ad`](graalvm/native-build-tools@70a22ad) Release 1.1.9
* [`226c2f2`](graalvm/native-build-tools@226c2f2) Merge pull request [#1021](https://redirect.github.com/graalvm/native-build-tools/issues/1021) from graalvm/update-metadata-to-1.0.10
* [`750e24d`](graalvm/native-build-tools@750e24d) Update reachability metadata to 1.0.10
* [`f9d090c`](graalvm/native-build-tools@f9d090c) Clarify layer selector and test suite support
* [`8a62507`](graalvm/native-build-tools@8a62507) Skip later Gradle layer consumers on GraalVM 25.0
* [`fa9cb64`](graalvm/native-build-tools@fa9cb64) Narrow GraalVM 25.0 layer test skips
* [`a7f0ca4`](graalvm/native-build-tools@a7f0ca4) Skip Gradle layer consumers on GraalVM 25.0
* [`cf67f05`](graalvm/native-build-tools@cf67f05) Skip Maven shared layer test on GraalVM 25.0
* [`60da37c`](graalvm/native-build-tools@60da37c) Skip Maven all-selector layer test on GraalVM 25.0
* [`0498739`](graalvm/native-build-tools@0498739) Fix layered image runtime distribution
* Additional commits viewable in [compare view](graalvm/native-build-tools@1.1.6...1.1.9)
  
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility\_score?dependency-name=org.graalvm.buildtools:native-maven-plugin&package-manager=maven&previous-version=1.1.6&new-version=1.1.9)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
Dependabot commands and options
  
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot show  ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement. rhei

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deprecate the fallback option — Native Image fallback feature removed in GraalVM 25.1

4 participants