From 12e5cd4b4593673ef7d032d4404d403c78a73194 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Nicoll?= Date: Mon, 23 Feb 2026 12:44:54 +0100 Subject: [PATCH] Consistently enable parameters generation with AOT This commit updates the Maven Plugin to retain parameters information in AOT-generated code. This aligns with the Gradle Plugin and allows to consistently use parameter names resolution in generated code. Closes gh-49268 --- .../src/intTest/projects/aot-compiler-arguments/pom.xml | 2 +- .../java/org/springframework/boot/maven/AbstractAotMojo.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/intTest/projects/aot-compiler-arguments/pom.xml b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/intTest/projects/aot-compiler-arguments/pom.xml index 6b0d97eab91..e4c3ce0e73f 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/intTest/projects/aot-compiler-arguments/pom.xml +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/intTest/projects/aot-compiler-arguments/pom.xml @@ -22,7 +22,7 @@ process-aot - -verbose --invalid-compiler-arg + -parameters --invalid-compiler-arg diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AbstractAotMojo.java b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AbstractAotMojo.java index 3adcd5c5361..adb196f31d8 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AbstractAotMojo.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AbstractAotMojo.java @@ -168,6 +168,7 @@ public abstract class AbstractAotMojo extends AbstractDependencyFilterMojo { args.add(target); } } + args.add("-parameters"); args.addAll(new RunArguments(this.compilerArguments).getArgs()); Iterable compilationUnits = fileManager.getJavaFileObjectsFromPaths(sourceFiles); Errors errors = new Errors();