I'm trying to build a native image based on the documentation found on https://docs.spring.io/spring-boot/docs/current/reference/html/native-image.html#native-image.developing-your-first-application.buildpacks

The relevant parts of my pom contains

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>3.1.2</version>
        <relativePath/>
    </parent>
      ... cut out to reduce size...
    <properties>
        <java.version>20</java.version>
    </properties>
    <dependencies>
      ... cut out to reduce size...
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.11.0</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.graalvm.buildtools</groupId>
                <artifactId>native-maven-plugin</artifactId>
                <version>0.9.24</version>
            </plugin>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <version>3.1.2</version>
                <configuration>
                    <image>
                        <builder>paketobuildpacks/builder-jammy-tiny</builder>
                        <env>
                            <BP_JVM_VERSION>20.0.1</BP_JVM_VERSION>
                            <BP_NATIVE_IMAGE>true</BP_NATIVE_IMAGE>
                        </env>
                    </image>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

I've tried many variations of BP_JVM_VERSIONS and builder but I can't seem to find any combination that will actually work. I always end up with

[INFO]     [creator]     Paketo Buildpack for BellSoft Liberica 10.2.8
[INFO]     [creator]       unable to find dependency
[INFO]     [creator]       no valid dependencies for native-image-svm, 20.0.1, and io.buildpacks.stacks.jammy.tiny in [(jdk, 8.0.382, [io.buildpacks.stacks.bionic io.paketo.stacks.tiny *]) (jre, 8.0.382, [io.buildpacks.stacks.bionic io.paketo.stacks.tiny *]) (jdk, 11.0.20, [io.buildpacks.stacks.bionic io.paketo.stacks.tiny *]) (jre, 11.0.20, [io.buildpacks.stacks.bionic io.paketo.stacks.tiny *]) (native-image-svm, 11.0.20, [io.buildpacks.stacks.bionic io.paketo.stacks.tiny *]) (jdk, 17.0.8, [io.buildpacks.stacks.bionic io.paketo.stacks.tiny *]) (jre, 17.0.8, [io.buildpacks.stacks.bionic io.paketo.stacks.tiny *]) (native-image-svm, 17.0.8, [io.buildpacks.stacks.bionic io.paketo.stacks.tiny *]) (jdk, 20.0.2, [io.buildpacks.stacks.bionic io.paketo.stacks.tiny *]) (jre, 20.0.2, [io.buildpacks.stacks.bionic io.paketo.stacks.tiny *])]

GraalVM seems to have support for Java 20 (https://www.graalvm.org/release-notes/JDK_20/) Bellsoft Liberica NIK 23 semms to have support jor Java 20 (https://bell-sw.com/pages/downloads/native-image-kit/)

... still I'm not able to build a Java 20 based native image. Am I missing something - is Java 20 not supported yet? If so - where can I find which supported configurations that exists?

Comment From: snicoll

I am not sure but there's nothing we can do here about it. We're invoking a buildpack and the message you get is from it. Please report it to https://github.com/paketo-buildpacks/native-image/ and add a link here so that we can follow along.

Comment From: DavidBoman

I must admit I was not totally sure about the origin of the error. Thanks for the clairification - I'll head over to paketo-buildpacks instead!