As described in spring-projects/spring-boot#31947, Spring portfolio projects need to be able to contribute some native-image.properties parameters during AOT processing in order to include a feature (HTTP or HTTPS support, support for additional charsets, etc.).

Spring Boot itself currently specifies some options that are required for Spring applications here.

Based on the latest discussions with the GraalVM team, I trend to think that we should not provide a public API with each or some parameters (like enableHttp() or enableHttps()) because this is a controversial feature that may evolve significantly the medium term. For example, GraalVM could become more clever and no longer require some parameters. Also it is hard to draw a line between what we would add or not in this API (there are a lot of parameters available). That said, for now there is a need to be able to contribute those parameters so providing no infrastructure for that seems unacceptable.

My proposal is to include a generic way to contribute arbitrary String parameters to native-image during AOT processing, or at the very least to document how to do it with current infrastructure in a way that allows multiple contributions across the portfolio. To be discussed with @snicoll and the team.

Comment From: sdeleuze

After a team discussion, we have decided to try to move forward without public APIs for adding native-image.properties parameters: - Dependencies like Spring Portfolio project can add a /META-INF/native-image/$groupId/$artifiactId/native-image.properties file to contribute parameters like --enable-http or --enable-https. - End users can do the same or configure those parameters at Native Build Tools level

I will create follow up issue(s) to introduce related parameters at Framework level.

If a need comes to do conditional registration of native-image parameters we can easily reopen this issue and implement it.