You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Ben Romberg (JIRA)" <ji...@apache.org> on 2015/07/27 21:31:04 UTC
[jira] [Created] (MCOMPILER-247) "Pass Compiler Arguments"
Documentation is inaccurate
Ben Romberg created MCOMPILER-247:
-------------------------------------
Summary: "Pass Compiler Arguments" Documentation is inaccurate
Key: MCOMPILER-247
URL: https://issues.apache.org/jira/browse/MCOMPILER-247
Project: Maven Compiler Plugin
Issue Type: Bug
Reporter: Ben Romberg
Priority: Minor
The documentation on http://maven.apache.org/plugins/maven-compiler-plugin/examples/pass-compiler-arguments.html shows how to pass additional compiler arguments:
{code}
<project>
[...]
<build>
[...]
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<compilerArgs>
<arg>-verbose</arg>
<arg>-Xlint:all,-options,-path</arg>
</compilerArgs>
</plugin>
</plugins>
[...]
</build>
[...]
</project>
{code}
It doesn't work, as the {compilerArgs} block needs to be inside the configuration block. Also, the indentation is off by a few spaces. This is how it actually works:
{code}
<project>
[...]
<build>
[...]
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<compilerArgs>
<arg>-verbose</arg>
<arg>-Xlint:all,-options,-path</arg>
</compilerArgs>
</configuration>
</plugin>
</plugins>
[...]
</build>
[...]
</project>
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)