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

Steven Schlansker commented on MCOMPILER-120:
---------------------------------------------

Thank you, I had to do this actually:

                    <!-- Remove after we move to maven-compiler-plugin 2.4 -->
                    <dependencies>
                      <dependency>
                        <groupId>org.codehaus.plexus</groupId>
                        <artifactId>plexus-compiler-api</artifactId>
                        <version>1.8.2</version>
                        <exclusions>
                          <exclusion>
                            <groupId>org.codehaus.plexus</groupId>
                            <artifactId>plexus-component-api</artifactId>
                          </exclusion>
                        </exclusions>
                      </dependency>
                      <dependency>
                        <groupId>org.codehaus.plexus</groupId>
                        <artifactId>plexus-compiler-manager</artifactId>
                        <version>1.8.2</version>
                        <exclusions>
                          <exclusion>
                            <groupId>org.codehaus.plexus</groupId>
                            <artifactId>plexus-component-api</artifactId>
                          </exclusion>
                        </exclusions>
                      </dependency>
                      <dependency>
                        <groupId>org.codehaus.plexus</groupId>
                        <artifactId>plexus-compiler-javac</artifactId>
                        <version>1.8.2</version>
                        <scope>runtime</scope>
                        <exclusions>
                          <exclusion>
                            <groupId>org.codehaus.plexus</groupId>
                            <artifactId>plexus-component-api</artifactId>
                          </exclusion>
                        </exclusions>
                      </dependency>
                    </dependencies>


but it does work now!

> Javac compiler plugin doesn't support -Werror
> ---------------------------------------------
>
>                 Key: MCOMPILER-120
>                 URL: https://jira.codehaus.org/browse/MCOMPILER-120
>             Project: Maven 2.x 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 is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to