Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
3.8.1
-
None
-
Arch Linux, OpenJDK 11.0.6.u10, Maven 3.6.3
Description
Compiling a project with the following maven-compiler-plugin configuration does not produce parameter name metadata in the class files:
<configuration>
<release>9</release>
<parameters>true</parameters>
</configuration>
I believe this is a mistake, because
javac --release 9 -parameters Test.java
will produce the metadata.
This behavior is due to dependency org.codehaus.plexus:plexus-compiler-javac:2.8.4, where in org.codehaus.plexus.compiler.javac.JavacCompiler, line 312, the function isPreJava18 is called. This function does not evaluate the release property, only source and compilerVersion.
Available workarounds in pom.xml are additionally specifying source or explicitly specifying the -parameters parameter in the plugin configuration.
Attachments
Issue Links
- is duplicated by
-
MCOMPILER-414 parameters flag does not apply to testCompile goal
-
- Closed
-
-
MCOMPILER-469 compiler plugin uses arkane rules to decide what the source code level is
-
- Closed
-
- links to