Annoyed by checkstyle errors?

Sometimes, when I try to build some (open-source) project from sources, I got checkstyle errors like this (example comes from Fuse ESB):

[INFO] [checkstyle:checkstyle {execution: validate}]
[WARNING] File encoding has not been set, using platform encoding UTF-8,
i.e. build is platform dependent!
[INFO] Starting audit...
../apache-camel-1.5.2.0-fuse/src/camel-core/src/test/java/org/apache/camel/processor/SetExchangePatternTest.java:62:
case child at indentation level 12 not at correct indentation, 8
[...]
../apache-camel-1.5.2.0-fuse/src/camel-core/src/test/java/org/apache/camel/processor/SetExchangePatternTest.java:70:
block child at indentation level 16 not at correct indentation, 12
Audit done.

[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] An error has occurred in Checkstyle report generation.

Embedded error: There are 9 checkstyle errors.

It's annyoing, cause all I want is to build it. So, what's the solution? Ah, it's simple:

mvn [commands] -Dcheckstyle.skip

It's much more convenient than looking for checkstyle plugin in pom.xml (especially if project has many modules and many pom.xml files).

 
 
 
This used to be my blog. I moved to http://tomek.kaczanowscy.pl long time ago.

 
 
 

Please comment using