maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benson Margulies (JIRA)" <j...@codehaus.org>
Subject [jira] (MCOMPILER-120) Javac compiler plugin doesn't support -Werror
Date Wed, 28 Jan 2015 22:10:19 GMT

    [ https://jira.codehaus.org/browse/MCOMPILER-120?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=361982#comment-361982
] 

Benson Margulies edited comment on MCOMPILER-120 at 1/28/15 4:08 PM:
---------------------------------------------------------------------

The problem here is 

{code}
 <showDeprecation>true</showDeprecation>
{code}

If this is present, the warnings disappear with -Werror.



was (Author: bmargulies):
The problem here is 

{code}
<showWarning>true</showWarnings>
{code}

If this is present, the warnings disappear with -Werror.


> Javac compiler plugin doesn't support -Werror
> ---------------------------------------------
>
>                 Key: MCOMPILER-120
>                 URL: https://jira.codehaus.org/browse/MCOMPILER-120
>             Project: Maven Compiler Plugin
>          Issue Type: Bug
>    Affects Versions: 2.1
>            Reporter: Christopher Webster
>            Assignee: Kristian Rosenvold
>             Fix For: 2.4
>
>         Attachments: JavacCompiler.java, JavacCompiler.patch, trial-maven.zip, werror.zip
>
>
> If I write a pom file like the following:
> {code:xml}...
>   		<plugin>
>   			<groupId>org.apache.maven.plugins</groupId>
>   			<artifactId>maven-compiler-plugin</artifactId>
>   			<version>2.1</version>
>   			<configuration>
>   			    <compilerId>javac</compilerId>
>   				<source>1.6</source>
>   				<target>1.6</target>
>   				
>   				<compilerArguments>
>   					<Werror /> 
>   					<Xlint:all />
>   				</compilerArguments>
>   				<showDeprecation>true</showDeprecation>
>   			</configuration>
>   		</plugin>{code}
> and if there are only warnings, then the build will not fail as intended by the compiler
Argument. The reason is that in compileInProcess the exit code from javac is only considered
if there are no messages. In the case of treating warnings as errors, there will be messages
but no errors so the intention of the build failure is lost. 



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)

Mime
View raw message