...
As an aggregator, the Jtest Plugin form for Maven must be executed only once during the build.
...
- Ensure that the Jtest Plugin for Maven is set up (see Configuring the Jtest Plugin for Maven).
Execute the jtest:jtest goal. Your command line may resemble the following:
Code Block 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).
Info By default, test sources are excluded from analysis. To analyze test code, disable the
excludeTestSources
option; see Jtest Goals Reference for MavenMaven#excludeTestSources.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:
Code Block mvn test-compile jtest:jtest
...