Create a project with support for web, native, etc, using: curl https://start.spring.io/starter.zip -d "type=maven-project&language=java&bootVersion=3.2.0-SNAPSHOT&baseDir=demo&groupId=com.example&artifactId=demo&name=demo&description=Demo project for Spring Boot&packageName=com.example.demo&packaging=jar&javaVersion=17&dependencies=web,actuator,testcontainers,native" -o demo.zip

Applies to both 3.2 Snapshot or M3.

Try to build image using: ./mvnw spring-boot:build-image -Pnative

Fails due to Buildpacks selecting 10.3.2, although 10.4 is already available:

[INFO]     [creator]     Paketo Buildpack for BellSoft Liberica 10.3.2
[INFO]     [creator]       unable to find dependency
[INFO]     [creator]       no valid dependencies for native-image-svm, 21, 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, 21.0.0, [io.buildpacks.stacks.bionic io.paketo.stacks.tiny *]) (jre, 21.0.0, [io.buildpacks.stacks.bionic io.paketo.stacks.tiny *])]
[INFO]     [creator]     Timer: Builder ran for 16.535442ms and ended at 2023-10-11T20:55:36Z
[INFO]     [creator]     ERROR: failed to build: exit status 1

Comment From: scottfrederick

Fails due to Buildpacks selecting 10.3.2, although 10.4 is already available:

Spring Boot does not control the versions of buildpacks that are used by default. Without any specific configuration in your pom.xml, the buildpacks bundled with the builder image will be used.

The default builder image used with Spring Boot 3.2 is paketobuildpacks/builder-jammy-base:latest. You can use the pack CLI command pack builder inspect paketobuildpacks/builder-jammy-tiny:latest to see what buildpacks are bundled with that builder. When I run that command, I see that the builder does in fact include paketo-buildpacks/bellsoft-liberica@10.3.2 as of this date. Paketo usually releases new builders on Fridays, and the next builder release is likely to include a newer Bellsoft Liberica buildpack.

You have the option to configure specific buildpacks if you don't like the versions bundled in the builder. See the Maven plugin documentation for more details. In this case, that configuration would look like this:

            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <image>
                        <buildpacks>
                            <buildpack>paketobuildpacks/bellsoft-liberica:10.4.0</buildpack>
                            <buildpack>urn:cnb:builder:paketo-buildpacks/java</buildpack>
                        </buildpacks>
                    </image>
                </configuration>
            </plugin>