dev@glassfish.java.net

Re: -Xlint:deprecated

From: Bill Shannon <bill.shannon_at_oracle.com>
Date: Fri, 08 Apr 2011 17:02:59 -0700

Jane Young wrote on 04/ 8/11 06:56 AM:
> Which module?
> If you add to artifact with "hk2-jar" packaging, add:
> <compilerArgument>-Xlint:deprecated</compilerArgument>
> in hk2-maven-plugin.
>
> e.g. v3/pom.xml
> <plugin>
> <groupId>com.sun.enterprise</groupId>
> <artifactId>hk2-maven-plugin</artifactId>
> <extensions>true</extensions>
> <configuration>
> *<compilerArgument>-Xlint:deprecated</compilerArgument> *
> ...
> </configuration>
> </plugin>
>
> For artifact with "jar" packaging, add the same element in maven-compiler-plugin.

Could we do this:

        <properties>
            <compiler.argument></compiler.argument>
        </properties>

        <compilerArgument>${compiler.argument}</compilerArgument>

So that I could do:

mvn -Dcompiler.argument=-Xlint:deprecation

Even better would be if there's a way to set the property based on the
presence of another property, so I could do:

mvn -Ddeprecated
or
mvn -Ddeprecated=true