mirror of https://github.com/apache/maven.git
make sure compiler warnings are output
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@321340 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f56c194b48
commit
3068a0259c
|
@ -60,9 +60,10 @@ public abstract class AbstractCompilerMojo
|
|||
* The default value is true.
|
||||
*
|
||||
* @parameter expression="${maven.compiler.debug}" default-value="true"
|
||||
* @deprecated
|
||||
*/
|
||||
private boolean debug;
|
||||
|
||||
|
||||
/**
|
||||
* Whether to output messages about what the compiler is doing
|
||||
*
|
||||
|
@ -83,7 +84,7 @@ public abstract class AbstractCompilerMojo
|
|||
* @parameter default-value="false"
|
||||
*/
|
||||
private boolean optimize;
|
||||
|
||||
|
||||
/**
|
||||
* Output warnings
|
||||
*
|
||||
|
@ -260,11 +261,11 @@ public abstract class AbstractCompilerMojo
|
|||
compilerConfiguration.setClasspathEntries( getClasspathElements() );
|
||||
|
||||
compilerConfiguration.setSourceLocations( compileSourceRoots );
|
||||
|
||||
|
||||
compilerConfiguration.setOptimize( optimize );
|
||||
|
||||
compilerConfiguration.setDebug( debug );
|
||||
|
||||
|
||||
compilerConfiguration.setVerbose( verbose );
|
||||
|
||||
compilerConfiguration.setShowWarnings( showWarnings );
|
||||
|
@ -390,6 +391,15 @@ public abstract class AbstractCompilerMojo
|
|||
{
|
||||
throw new CompilationFailureException( messages );
|
||||
}
|
||||
else
|
||||
{
|
||||
for ( Iterator i = messages.iterator(); i.hasNext(); )
|
||||
{
|
||||
CompilerError message = (CompilerError) i.next();
|
||||
|
||||
getLog().warn( message.toString() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private Set computeStaleSources( CompilerConfiguration compilerConfiguration, Compiler compiler,
|
||||
|
|
Loading…
Reference in New Issue