You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Arnaud Héritier <ah...@gmail.com> on 2013/10/17 18:26:07 UTC

Maven compiler options

Hi,

  Today in my build I had the well known warning :

[WARNING] xxxxx.java: xxxxx.java uses unchecked or unsafe operations.
[WARNING] xxxxx.java: Recompile with -Xlint:unchecked for details.

  Thus I updated my compiler plugin with

    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <configuration>
            <compilerArgs>
              <arg>-Xlint:unchecked</arg>
            </compilerArgs>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>

  And it works while the documentation is saying

http://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#compilerArgs
Sets the arguments to be passed to the compiler """if fork is set to true
."""

  Which isn't my case.

[DEBUG]   (f) fork = false

  Should we update the doc ? Do I miss something ?

  Cheers


-- 
-----
Arnaud Héritier
http://aheritier.net
Mail/GTalk: aheritier AT gmail DOT com
Twitter/Skype : aheritier

Re: Maven compiler options

Posted by Olivier Lamy <ol...@apache.org>.
On 18 October 2013 03:26, Arnaud Héritier <ah...@gmail.com> wrote:
> Hi,
>
>   Today in my build I had the well known warning :
>
> [WARNING] xxxxx.java: xxxxx.java uses unchecked or unsafe operations.
> [WARNING] xxxxx.java: Recompile with -Xlint:unchecked for details.
>
>   Thus I updated my compiler plugin with
>
>     <pluginManagement>
>       <plugins>
>         <plugin>
>           <groupId>org.apache.maven.plugins</groupId>
>           <artifactId>maven-compiler-plugin</artifactId>
>           <configuration>
>             <compilerArgs>
>               <arg>-Xlint:unchecked</arg>
>             </compilerArgs>
>           </configuration>
>         </plugin>
>       </plugins>
>     </pluginManagement>
>
>   And it works while the documentation is saying
>
> http://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#compilerArgs
> Sets the arguments to be passed to the compiler """if fork is set to true
> ."""
>
>   Which isn't my case.
>
> [DEBUG]   (f) fork = false
>
>   Should we update the doc ? Do I miss something ?

Yes and no.
using javax.tools.$ has changed how it works for this.


>
>   Cheers
>
>
> --
> -----
> Arnaud Héritier
> http://aheritier.net
> Mail/GTalk: aheritier AT gmail DOT com
> Twitter/Skype : aheritier



-- 
Olivier Lamy
Ecetera: http://ecetera.com.au
http://twitter.com/olamy | http://linkedin.com/in/olamy

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org