Question

I am trying to validate my project using PMD and findbugs plugin, in Eclipse juno IDE.I have already downloaded the required plugins and both of them work fine. However the project is using Maven 3 and I came across the the plugin tag inside the pom.xml.

My question is,do I need to change anything inside the pom.xml to use PMD and findbugs?, and how is the maven-pmd-plugin different from the eclipse pmd plugin,anyways?

Was it helpful?

Solution

The main difference between the Eclipse and Maven plugin is:

The Eclipse plugin requires, obviously, Eclipse to be run. It's totally fine, if you do the analysis in your IDE where you see nice messages and metrics.

On the other hand, when you instrument the Maven plugin you can trigger the code analysis from your build.

This is very useful if you have a continuous integration server like Jenkins. Their you can trigger first the pmd / findbugs analysis and then let Jenkins inspect the results to display it in a nice view. It is very handy, if you have some quality requirements where the build should fail or become unstable if the requirements weren't met.

So, if you stay with the Eclipse inspection, you must not modify the maven build. But if you would instrument an CI-Server, then you should do it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top