Greetings, all,
After Cedric's cry of anguish last night, I realized that my directions to Julie on
FindBugs/PMD integration were not appropriate.
The constraints for the developer environment should be:
- developers _should_ have to download and install the _sensors_ for all the tools we
can potentially sense in Hackystat (such as PMD, FindBugs, DependencyFinder).
- developers should _not_ have to download and install all the various third party tools
we might want to use (such as PMD, FindBugs, DependencyFinder).
Of course, the constraints for the binary distribution continue to be that the installer
should not have to download either the tools or the sensors.
Getting the development environment to behave correctly according to these constraints
was a little bit trickier than I first thought, but not much.
What I've done is to create hackyCore_Build/lib/pmd and hackyCore_Build/lib/findbugs, and
put the jar files containing the Ant taskdefs for these two systems into those
directories. (That is not enough to actually run the tools, but it is enough for the
build to support the <taskdef> associated with them).
Then, I provide a _default_ definition for env.PMD_HOME and env.FINDBUGS_HOME that is
used in the case where the developer has not defined these two environment variables.
These default definitions point to the lib directories mentioned above.
The net effect of the two actions above is to enable the build to proceed even if you
haven't installed PMD or FindBugs. If you _have_ installed PMD and/or FindBugs, then
those tools should function correctly and the lib directory entries will be ignored. You
do _not_ have to enable the sensors, of course, you just have to install them.
Next, I provide a macro called <makeCheckSensorAvailability>, which simplifies the code
required to check to see if the sensor associated with a tool is available. I invoke that
macro for JUnit, Checkstyle, PMD, and FindBugs inside hackystat.sensor.build.xml. After
updating from SVN, if you invoke Hackystat and do not have those sensors installed, you
will get a failure message directing you to invoke HackyInstaller and download the
missing sensor.
Let me know if you run into any problems with this approach.
Cheers,
Philip