PMD and Checkstyle is one of those utilities which help us to achieve it.
But sometime this small utility act as a hindrance for normal day to day development work.
Specially when you quick test a something.
It really irritates me when I make a small change and want to test whether it works or not and my build fails due to PMD or Checkstyle error.
There may be many fix for it. But I know two:
1) Make change in your pom.xml for it.
2) Use maven command option for it.
I prefer the 2nd one as you don't have to change your pom and will provide the detail about the same:
To disable style check:
-Dcheckstyle.skip=true
e.g : mvn -Dcheckstyle.skip=true install
To disable pmd violation check :
-Dpmd.failOnViolation=false
mvn -Dpmd.failOnViolation=false install
To disable Copy/Paste Detector (CPD) violation check:
-Dcpd.failOnViolation=falsemvn -Dcpd.failOnViolation=false install
No comments:
Post a Comment