1. Overview

This tutorial introduces the verifier plugin, one of the core plugins of the Maven build tool.

For an overview of the other core plugins, refer to this overview article.

2. Plugin Goal

The verifier plugin has only one goal – verify. This goal verifies the existence or non-existence of files and directories, optionally checking file content against a regular expression.

Despite its name, the verify goal is bound to the integration-test phase by default rather than the verify phase.

3. Configuration

The verifier plugin is triggered only if it's explicitly added to the pom.xml:


This link shows the newest version of the plugin.

The default location of the verification file is src/test/verifier/verifications.xml. We must set a value for the verificationFile parameter if we want to use another file.

Here's the content of the verification file shown in the given configuration:


This verification file confirms that a file named input-resources/baeldung.txt exists and that it contains the word Welcome. We've already added such a file before, thus the goal execution succeeds.

4. Conclusion

In this article, we walk through the verifier plugin and described how to customize it.

The complete source code for this tutorial can be found over on GitHub.

Next »
The Maven Site Plugin
« Previous
The Maven Clean Plugin