Maven Plugin Testing Harness

The Maven Plugin Testing Harness provides mechanisms to manage tests on Mojos, i.e. by pre-constructing the Plexus components, providing stub objects for Maven functionality such as projects, and populating fields from an XML file that resembles the plugin configuration in the POM.

The best way to start is to read the cookbook How to use Maven Plugin Testing Harness.

Examples

The following examples shows how to use the Testing Harness in more advanced usecases: