-
Notifications
You must be signed in to change notification settings - Fork 19
Build PMD and test your new rule
Robert Sösemann edited this page Jul 11, 2016
·
13 revisions
-
Install Maven (
brew install mavenif you are using Homebrew) in order to executemvncommands in your CLI. -
Create a Maven
toolchains.xmlfile 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/targetdirectory.
-
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.
