You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Jiri Kraml (Jira)" <ji...@apache.org> on 2020/04/29 14:05:00 UTC
[jira] [Created] (MCOMPILER-413) Parameters does not work when only
release is specified
Jiri Kraml created MCOMPILER-413:
------------------------------------
Summary: Parameters does not work when only release is specified
Key: MCOMPILER-413
URL: https://issues.apache.org/jira/browse/MCOMPILER-413
Project: Maven Compiler Plugin
Issue Type: Bug
Affects Versions: 3.8.1
Environment: Arch Linux, OpenJDK 11.0.6.u10, Maven 3.6.3
Reporter: Jiri Kraml
Compiling a project with the following maven-compiler-plugin configuration does not produce parameter name metadata in the class files:
{{<{color:#0033b3}configuration{color}>}}
{{ <{color:#0033b3}release{color}>9</{color:#0033b3}release{color}>}}
{{ <{color:#0033b3}parameters{color}>true</{color:#0033b3}parameters{color}>}}
{{</{color:#0033b3}configuration{color}>}}
{{}}
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.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)