1

There are five choices listed in the maven documentation on testing maven plugins:

  • maven-verifier
  • maven-invoker-plugin
  • shitty-maven-plugin
  • maven-it-plugin
  • maven-plugin-management-plugin

I've tried a few of these and had a number of problems:

  • maven-verifier appears to have only a limited set of verifications -- I need to be able to make arbitrary assertions
  • shitty-maven-plugin has a bug that prevents it working with maven 3
  • nethier maven-plugin-management-plugin nor maven-it-plugin are stable and don't seem to be under active development

Is anyone able to recommend any of these plugins? Can you provide some example configuration?

hertzsprung
  • 9,445
  • 4
  • 42
  • 77
  • I've just stumbled upon maven's [plugin-testing](http://maven.apache.org/plugin-testing/), so I'll take a look at that, too. – hertzsprung Aug 22 '11 at 09:04

1 Answers1

4

The best thing i can recommend is the maven-invoker-plugin, cause it's can handle many situations and produces a real maven environment with all things which you really need to do integration test in relationship with Maven Plugins.

khmarbaise
  • 92,914
  • 28
  • 189
  • 235
  • This will let me run a goal on any pom. I just need to work out how to stage the plugin before executing the invoker. – hertzsprung Sep 06 '11 at 17:41
  • You can localy install the plugin during an integration test. – khmarbaise Sep 06 '11 at 20:14
  • 1
    The maven-invoker-plugin has an example on it pages how to do this: http://maven.apache.org/plugins/maven-invoker-plugin/examples/install-artifacts.html – khmarbaise Sep 06 '11 at 20:34