I want to execute a maven target but checkstyle errors forbids that. I have no time right now to correct checkstyle error (my checkstyle rules have been recently updated and I can't handle all of them right now).
Is there a way to disable checkstyle operation and execute my goal anyway ?
Then to disable Checkstyle, you use //CHECKSTYLE:OFF and //CHECKSTYLE:ON (default values) in your code.
If you want to disable checkstyle from your pom, you can add the checkstyle plugin to the pom and set the skip flag to prevent the check.
In latest eclipse version(9/2014) we have to visit Help -> Eclipse Market and go to installed tab. Then select uninstall. After uninstallation this will ask for a eclipse restart. And that is it.
Solution is : mvn [target] -Dcheckstyle.skip
.
I like this solution as it is temporary and do not require editing of pom files, or anything that can be versioned.
RandomCoders answer is the preferred one.
If you want to disable checkstyle from your pom, you can add the checkstyle plugin to the pom and set the skip flag to prevent the check.
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-checkstyle-plugin</artifactId> <configuration> <skip>true</skip> </configuration> </plugin>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With