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.
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 (https://maven.apache.org/plugins/maven-checkstyle-plugin/) please either:
- Allow the tests to be validated using the command
- Amend the pom file to exclude Diffblue tests, as shown in the example below.
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-checkstyle-plugin</artifactId> <configuration> <excludes>**/generated/**/*</excludes> </configuration> </plugin>