-
Notifications
You must be signed in to change notification settings - Fork 18
Build PMD and test your new rule
Robert Sösemann edited this page Jul 11, 2016
·
13 revisions
-
Install Maven (
brew install maven
if you are using Homebrew) in order to executemvn
commands in your CLI. -
Create a Maven
toolchains.xml
file as described in the official PMD README. -
To build PMD navigate with your CLI to the root directory of PMD and execute
mvn clean package
. -
If the build fails you have to have a deeper look into the debug log to find and fix the root cause. Most of the time a test fails or the toolchains.xml file is invalid.
-
After your build succeeds navigate to
/pmd/pmd-dist/target
directory. -
Unzip the generated
pmd-bin-*.*.*-SNAPSHOT.zip
. -
Run PMD
pmd-bin-*.*.*-SNAPSHOT/bin/run.sh pmd -d /files/to/analyse -f text -R apex-ruleset
. More information about running PMD via command line you can finde here.