I configured Maven to use the checkstyle plugin.

Here is what I have in pom.xml's build section :

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-checkstyle-plugin</artifactId>
            <version>2.5</version>
            <executions>
                <execution>
                    <goals>
                        <goal>check</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <consoleOutput>true</consoleOutput>
                <logViolationsToConsole>true</logViolationsToConsole>
                <failOnViolation>true</failOnViolation>
                <configLocation>${basedir}/.../checkstyle-config.xml
                </configLocation>
            </configuration>
        </plugin>

I am getting checkstyle errors in Eclipse using the same configuration file
but Maven build does not fail. It builds the project successfully.

I am trying to stop the maven build if there is a checkstyle issue with the
code.

Is there something I am missing?

Thanks.



--
View this message in context: 
http://maven.40175.n5.nabble.com/Maven-build-does-not-fail-due-to-checkstyle-errors-tp5801275.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to