[MCOMPILER-595] Enable parameter metadata by default - #1090
Conversation
Enable -parameters for compile and testCompile unless explicitly disabled. Extend MCOMPILER-298 to cover both the default and opt-out behavior. Fixes apache#858
|
In Maven 3, the Maven Compiler Plugin often overwrote the default options of the standard In the 4.x line of Maven Compiler Plugin, a design goal so far was to have the same defaults as the standard Given that the default value of this parameter can be set by the |
|
While I have to enable it all the time for Spring Framework, I can deal with it. I saw the #858 and ran with it. I guess both the PR and the issue should be closed then. |
|
Thanks. I'm closing this pull request on the basis of consistency with default behaviour of standard |
Summary
-parametersby default for bothcompiler:compileandcompiler:testCompile.maven.compiler.parameters=falseopts out of parameter-name metadata.Motivation
More frameworks rely on reflection to obtain method parameter names. Generating that metadata by default makes those names available without requiring every project to opt in explicitly, while retaining a configuration switch for projects that do not want the metadata.
Fixes #858
Validation
JAVA_HOME=/opt/jdks/latest-21 /opt/maven/latest-4/bin/mvn -ntp -Prun-its -Dinvoker.test=MCOMPILER-298 clean verifyFollowing this checklist to help us incorporate your
contribution quickly and easily:
Note that commits might be squashed by a maintainer on merge.
This may not always be possible but is a best-practice.
mvn verifyto make sure basic checks pass.A more thorough check will be performed on your pull request automatically.
mvn -Prun-its verify).If your pull request is about ~20 lines of code you don't need to sign an
Individual Contributor License Agreement if you are unsure
please ask on the developers list.
To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.