-
Notifications
You must be signed in to change notification settings - Fork 19
Build PMD and test your new rule
-
Install Maven (
brew install mavenif you are using Homebrew) in order to executemvncommands in your CLI. -
Before you are able to build PMD you have to create a toolchains.xml file. You can find more information about that 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.
