maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anders Hammar <and...@hammar.net>
Subject Re: Compiler warnings treated as errors
Date Sat, 27 Jul 2013 06:46:19 GMT
> And why does it think, that compilation failed? The same source is
> successfully compiled by the compiler plugin 2.3.2. It could be also
> compiled successfully in another module with 2.5.1 and 3.1. The compiler
> source and target are set to 1.5.
>

I don't know. You need to debug.

/Anders


>
>
> On Wed, Jul 24, 2013 at 12:14 PM, Anders Hammar <anders@hammar.net> wrote:
>
> > > The following code seems a bit strange to me. Why does it throw a
> > > compilation failure exception when there are warnings?
> > >
> > >             if ( !errors.isEmpty() )
> > >             {
> > >                 throw new CompilationFailureException( errors );
> > >             }
> > >             else
> > >             {
> > >                 throw new CompilationFailureException( warnings );
> > >             }
> > >
> >
> > It's due to the wrapping if clause you're not quoting:
> >
> > if ( failOnError && !compilerResult.isSuccess() )
> >
> > The compilation has failed as indicated by !compilerResult.isSuccess().
> >
> > /Anders
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message