TimMoore/mojo-executor — pull request #5 by jelmerk (2012-11-05 21:43:47+00:00)
Title: Added support for plugin dependencies

I added support for plugin dependencies. I would appreciate it if you could take a look at it and see if this is something that you want to add to the mainline

Here's an example of what it looks like when you use it :

executeMojo(
plugin(
groupId("org.apache.maven.plugins"),
artifactId("maven-assembly-plugin"),
version("2.3")
),
goal("single"),
configuration(
element(name("appendAssemblyId"), "false"),
element(name("finalName"), project.getArtifactId()),
element(name("descriptorRefs"),
element(name("descriptorRef"), "puppet-module"))
),
dependencies(
dependency(
groupId("com.company.descriptors"),
artifactId("my-descriptor"),
version("0.1.0-SNAPSHOT")
)
),
executionEnvironment(
project,
session,
pluginManager
)
);

I extended the dsl and made sure that it does not break backwards compatibility. All tests pass and i added one extra test that illustrates the feature