public final class MyMojoExecutorV15 extends Object
executeMojo(plugin(groupId("org.apache.maven.plugins"), artifactId("maven-dependency-plugin"), version("2.0")), goal("copy-dependencies"), configuration(element(name("outputDirectory"), "${project.build.directory}/foo")), executionEnvironment(project, session, pluginManager));
Modifier and Type | Class and Description |
---|---|
static class |
MyMojoExecutorV15.Element
Element wrapper class for configuration elements.
|
static class |
MyMojoExecutorV15.ExecutionEnvironment
Collects Maven execution information.
|
static class |
MyMojoExecutorV15.ExecutionEnvironmentM2
Collects Maven 2 execution information.
|
static class |
MyMojoExecutorV15.ExecutionEnvironmentM3
Collects Maven 3 execution information.
|
Modifier and Type | Method and Description |
---|---|
static String |
artifactId(String artifactId)
Wraps the artifact id string in a more readable format.
|
static org.codehaus.plexus.util.xml.Xpp3Dom |
configuration(MyMojoExecutorV15.Element... elements)
Builds the configuration for the goal using Elements.
|
static MyMojoExecutorV15.Element |
element(String name,
MyMojoExecutorV15.Element... elements)
Constructs the element containing child elements.
|
static MyMojoExecutorV15.Element |
element(String name,
String value)
Constructs the element with a textual body.
|
static void |
executeMojo(org.apache.maven.model.Plugin plugin,
String goal,
org.codehaus.plexus.util.xml.Xpp3Dom configuration,
MyMojoExecutorV15.ExecutionEnvironment env)
Entry point for executing a mojo.
|
static void |
executeMojoImpl(org.apache.maven.model.Plugin plugin,
String goal,
org.codehaus.plexus.util.xml.Xpp3Dom configuration,
MyMojoExecutorV15.ExecutionEnvironmentM2 env)
Entry point for executing a mojo
|
static void |
executeMojoImpl(org.apache.maven.model.Plugin plugin,
String goal,
org.codehaus.plexus.util.xml.Xpp3Dom configuration,
MyMojoExecutorV15.ExecutionEnvironmentM3 env)
Entry point for executing a mojo
|
static MyMojoExecutorV15.ExecutionEnvironment |
executionEnvironment(org.apache.maven.project.MavenProject mavenProject,
org.apache.maven.execution.MavenSession mavenSession,
org.apache.maven.plugin.BuildPluginManager pluginManager)
Constructs the
MyMojoExecutorV15.ExecutionEnvironment instance fluently. |
static MyMojoExecutorV15.ExecutionEnvironment |
executionEnvironment(org.apache.maven.project.MavenProject mavenProject,
org.apache.maven.execution.MavenSession mavenSession,
org.apache.maven.plugin.PluginManager pluginManager)
Constructs the
MyMojoExecutorV15.ExecutionEnvironment instance fluently. |
static String |
goal(String goal)
Wraps the goal string in a more readable format.
|
static String |
groupId(String groupId)
Wraps the group id string in a more readable format.
|
static String |
name(String name)
Wraps the element name string in a more readable format.
|
static org.apache.maven.model.Plugin |
plugin(String groupId,
String artifactId)
Defines the plugin without its version.
|
static org.apache.maven.model.Plugin |
plugin(String groupId,
String artifactId,
String version)
Defines a plugin.
|
static String |
version(String version)
Wraps the version string in a more readable format.
|
public static void executeMojo(org.apache.maven.model.Plugin plugin, String goal, org.codehaus.plexus.util.xml.Xpp3Dom configuration, MyMojoExecutorV15.ExecutionEnvironment env) throws org.apache.maven.plugin.MojoExecutionException
plugin
- The plugin to executegoal
- The goal to executeconfiguration
- The execution configurationenv
- The execution environmentorg.apache.maven.plugin.MojoExecutionException
- If there are any exceptions locating or executing the mojopublic static void executeMojoImpl(org.apache.maven.model.Plugin plugin, String goal, org.codehaus.plexus.util.xml.Xpp3Dom configuration, MyMojoExecutorV15.ExecutionEnvironmentM2 env) throws org.apache.maven.plugin.MojoExecutionException
plugin
- The plugin to executegoal
- The goal to executeconfiguration
- The execution configurationenv
- The execution environmentorg.apache.maven.plugin.MojoExecutionException
- If there are any exceptions locating or executing the mojopublic static void executeMojoImpl(org.apache.maven.model.Plugin plugin, String goal, org.codehaus.plexus.util.xml.Xpp3Dom configuration, MyMojoExecutorV15.ExecutionEnvironmentM3 env) throws org.apache.maven.plugin.MojoExecutionException
plugin
- The plugin to executegoal
- The goal to executeconfiguration
- The execution configurationenv
- The execution environmentorg.apache.maven.plugin.MojoExecutionException
- If there are any exceptions locating or executing the mojopublic static MyMojoExecutorV15.ExecutionEnvironment executionEnvironment(org.apache.maven.project.MavenProject mavenProject, org.apache.maven.execution.MavenSession mavenSession, org.apache.maven.plugin.PluginManager pluginManager)
MyMojoExecutorV15.ExecutionEnvironment
instance fluently.mavenProject
- The current Maven projectmavenSession
- The current Maven sessionpluginManager
- The Maven plugin managerpublic static MyMojoExecutorV15.ExecutionEnvironment executionEnvironment(org.apache.maven.project.MavenProject mavenProject, org.apache.maven.execution.MavenSession mavenSession, org.apache.maven.plugin.BuildPluginManager pluginManager)
MyMojoExecutorV15.ExecutionEnvironment
instance fluently.mavenProject
- The current Maven projectmavenSession
- The current Maven sessionpluginManager
- The Maven plugin managerpublic static org.codehaus.plexus.util.xml.Xpp3Dom configuration(MyMojoExecutorV15.Element... elements)
elements
- A list of elements for the configuration sectionpublic static org.apache.maven.model.Plugin plugin(String groupId, String artifactId)
groupId
- The group idartifactId
- The artifact idpublic static org.apache.maven.model.Plugin plugin(String groupId, String artifactId, String version)
groupId
- The group idartifactId
- The artifact idversion
- The plugin versionpublic static String groupId(String groupId)
groupId
- The valuepublic static String artifactId(String artifactId)
artifactId
- The valuepublic static String version(String version)
version
- The valuepublic static String goal(String goal)
goal
- The valuepublic static String name(String name)
name
- The valuepublic static MyMojoExecutorV15.Element element(String name, String value)
name
- The element namevalue
- The element text valuepublic static MyMojoExecutorV15.Element element(String name, MyMojoExecutorV15.Element... elements)
name
- The element nameelements
- The child elementsCopyright © 2018 universAAL Consortium. All rights reserved.