Problem description

Repository demonstrating issue: https://github.com/smurf667/spring-boot-maven-plugin-aot-sysprop-quotes Spring Boot version: 3.5.4 Maven version: 3.9.8 JDK: Eclipse Temurin 21 OS affected: Linux OS unaffected: Windows

Using spring-boot-maven-plugin with Spring AOT (specifically the process-aot goal), system properties configured via <systemPropertyVariables> are quoted in the generated command line as follows:

return String.format("-D%s=\"%s\"", key, value);

This behavior breaks environment variable substitution when running on Linux. Specifically, system properties fail to resolve properly when set via pom.xml. In this case, the value is surrounded with double quotes at runtime, affecting behavior; no quotes are expected.

Hypothesis

Windows' command-line parsing strips the outer quotes, but Linux preserves them, causing Spring's property resolution to fail. When the value hello is configured, the quoted value "hello" is treated literally, rather than hello.