To perform static analysis on your code:
Execute the jtest:jtest goal. Your command line may resemble the following:
mvn jtest:jtest |
The Jtest Plugin for Maven will collect the necessary build data in the .json file, and analyze your code depending on the configuration you provided (see Configuring Jtest Execution).
Review the analysis results (see Reviewing Results).
By default, test sources are excluded from analysis. To analyze the test code, enable the |
If your build is extended by plugins which affect the analyzed scope (for example, by appending or modifying resource files in the generate-resources phase), you can either execute all those phases so that Jtest can collect complete project data or simply execute the test-compile phase before jtest:jtest, as below:
mvn test-compile jtest:jtest |