I have created a maven2 Mojo that inspects certain file types for instances of certain strings. It is designed to be used in the test phase to report whether these files are vaild or not.
When it finds these undesired strings it outputs build failure alerts and fails the maven build using MojoFailureException.
I would like to do some integration testing with this Mojo everytime I compile/install it. Ideally I imagine a scenario where I have several files with the strings that should fail the build and then test the maven2 output to assert that those files are failing. What is the best way to go about doing this kind of testing in a maven2 mojo?
Thanks