Hi Dror,

> I'm trying to change java compiler warning to error and error to warning.
> It is easily done on the Eclipse environment, but I haven't found a way to
> do the same on our build server.

Javac (which is what Maven uses) is a completely different compiler than
Eclipse's JDT core compiler. That said, Javac does allow you to control
some things. You can set the build to fail if there are any warnings using
the -Werror flag, and you can control which sorts of things are reported as
warnings using the -Xlint flags (see e.g.
http://docs.oracle.com/javase/1.5.0/docs/tooldocs/windows/javac.html).

HTH,
Curtis

P.S. I found this information very quickly on StackOverflow with a Google
search for "javac warnings errors":

http://stackoverflow.com/questions/1040074/javac-treat-warnings-as-errors


On Thu, Jul 12, 2012 at 11:03 AM, dror <dror.ba...@gmail.com> wrote:

> I'm trying to change java compiler warning to error and error to warning.
> For example:
> fallthroughCase=error
> nullReference=error
> enumIdentifier=error
> וnusedObjectAllocation=warning
> redundantNullCheck=warning
>
> It is easily done on the Eclipse environment, but I haven't found a way to
> do the same on our build server. Any help would be mostly appreciated!
>
> Thanks, Dror
>
> --
> View this message in context:
> http://maven.40175.n5.nabble.com/How-to-change-java-compiler-warning-to-error-tp5713975.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>

Reply via email to