To perform static analysis on your code:

  1. Ensure that the Jtest Plugin for Maven is set up (see Configuring the Jtest Plugin for Maven).
  2. Execute the jtest:jtest goal. Your command line may resemble the following:

    mvn jtest:jtest
  3. Review the analysis results (see Reviewing Results).

    By default, test sources are excluded from analysis. To analyze the test code, enable the includeTestSources command line option; see Modifying the Scope with the jtest.includeTestSources Option.

  4. 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