You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Robert Scholte (Jira)" <ji...@apache.org> on 2021/09/06 18:59:00 UTC
[jira] [Updated] (MCOMPILER-469) compiler plugin uses arkane rules
to decide what the source code level is
[ https://issues.apache.org/jira/browse/MCOMPILER-469?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Scholte updated MCOMPILER-469:
-------------------------------------
Description:
When compiling a java 8+ code base, unless there is an actual <source>8</source> configuration parameter to the plugin, the plugin will ignore other directives such as <parameter> because it believes that the compiler is a 1.7 or older compiler.
e.g.
{code:xml}
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<release>11</release>
<parameters>true</parameters>
</configuration>
</plugin>
{code}
will silently ignore the <parameters> flag as it believes the compiler to be ancient.
This should be better documented or it should also consider checking the <release> setting to determine what version the compiler is.
As a workaround, we set the <source> and <release> configuration to the same value.
was:
When compiling a java 8+ code base, unless there is an actual <source>8</source> configuration parameter to the plugin, the plugin will ignore other directives such as <parameter> because it believes that the compiler is a 1.7 or older compiler.
e.g.
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<release>11</release>
<parameters>true</parameters>
</configuration>
</plugin>
will silently ignore the <parameters> flag as it believes the compiler to be ancient.
This should be better documented or it should also consider checking the <release> setting to determine what version the compiler is.
As a workaround, we set the <source> and <release> configuration to the same value.
> compiler plugin uses arkane rules to decide what the source code level is
> -------------------------------------------------------------------------
>
> Key: MCOMPILER-469
> URL: https://issues.apache.org/jira/browse/MCOMPILER-469
> Project: Maven Compiler Plugin
> Issue Type: Bug
> Reporter: Henning Schmiedehausen
> Priority: Minor
>
> When compiling a java 8+ code base, unless there is an actual <source>8</source> configuration parameter to the plugin, the plugin will ignore other directives such as <parameter> because it believes that the compiler is a 1.7 or older compiler.
> e.g.
> {code:xml}
> <plugin>
> <artifactId>maven-compiler-plugin</artifactId>
> <version>3.8.1</version>
> <configuration>
> <release>11</release>
> <parameters>true</parameters>
> </configuration>
> </plugin>
> {code}
> will silently ignore the <parameters> flag as it believes the compiler to be ancient.
> This should be better documented or it should also consider checking the <release> setting to determine what version the compiler is.
> As a workaround, we set the <source> and <release> configuration to the same value.
>
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)