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
This commit is contained in:
Stéphane Nicoll
2026-02-23 12:44:54 +01:00
parent d4610e499c
commit 12e5cd4b45
2 changed files with 2 additions and 1 deletions
@@ -22,7 +22,7 @@
<goal>process-aot</goal>
</goals>
<configuration>
<compilerArguments>-verbose --invalid-compiler-arg</compilerArguments>
<compilerArguments>-parameters --invalid-compiler-arg</compilerArguments>
</configuration>
</execution>
</executions>
@@ -168,6 +168,7 @@ public abstract class AbstractAotMojo extends AbstractDependencyFilterMojo {
args.add(target);
}
}
args.add("-parameters");
args.addAll(new RunArguments(this.compilerArguments).getArgs());
Iterable<? extends JavaFileObject> compilationUnits = fileManager.getJavaFileObjectsFromPaths(sourceFiles);
Errors errors = new Errors();