checkstyle and pmd

first of all i think checkstyle and pmd are 2 really cool tools, which can improve java source code… but its kinda hard to fulfill them…

or lets say… an old project is really hard… mainly it should be easy, but due to svn and history reasons, an automated refactoring is crap!

but lets do just the important and simple things:

<plugin>
       <groupId>org.apache.maven.plugins</groupId>
       <artifactId>maven-checkstyle-plugin</artifactId>
       <configuration>
              <configLocation>[remote file]</configLocation>
       </configuration>
</plugin>
<plugin>
       <groupId>org.apache.maven.plugins</groupId>
       <artifactId>maven-pmd-plugin</artifactId>
       <version>2.5</version>
 </plugin>

run checkstyle

mvn checkstyle:check

run pmd

mvn pmd:pmd

and with hudson is really cool 🙂

Comments are closed.