Building projects with Maven

If your project uses the Maven build system, cd into the directory containing the pom.xml file for the module you wish to build.

For a single-module project, this is typically located at the root of your repository. For a multi-module project, this may be within a sub-directory.

To compile the project, run the mvn test-compile command. If successful, you should see a BUILD SUCCESS message towards the end of the output from Maven. Note that we recommend mvn test-compile rather than mvn compile because the former may produce configuration files which have to be taken into account to verify the tests.

Maven Troubleshooting

If dcover cannot validate the tests it generates due to an incompatibility with the stylecheck used in your environment, you will receive an error message.

If your project uses the Checkstyle plugin ( please either:

  • Allow the tests to be validated using the command --ignore-stylecheck=true
  • Amend the pom file to exclude Diffblue tests, as shown in the example below.

results matching ""

    No results matching ""