Package io.micronaut.maven.services
Class ExecutorService
java.lang.Object
io.micronaut.maven.services.ExecutorService
Provides methods to execute goals on the current project.
- Since:
- 1.1
- Author:
- Álvaro Sánchez-Mariscal
-
Constructor Summary
ConstructorsConstructorDescriptionExecutorService(org.apache.maven.project.MavenProject mavenProject, org.apache.maven.execution.MavenSession mavenSession, org.apache.maven.plugin.BuildPluginManager pluginManager, org.apache.maven.shared.invoker.Invoker invoker) -
Method Summary
Modifier and TypeMethodDescriptionvoidexecuteGoal(String pluginKey, String goal) Executes the given goal from the given plugin coordinates.voidexecuteGoal(String pluginGroup, String pluginArtifact, String pluginVersion, String goal, org.codehaus.plexus.util.xml.Xpp3Dom configuration) Executes a goal using the given arguments.org.apache.maven.shared.invoker.InvocationResultinvokeGoal(String pluginKey, String goal) Executes a goal using the Maven shared invoker.org.apache.maven.shared.invoker.InvocationResultinvokeGoals(String... goals) Executes a goal using the Maven shared invoker.org.apache.maven.shared.invoker.InvocationResultinvokeGoals(org.apache.maven.project.MavenProject project, String... goals) Executes a goal using the Maven shared invoker.
-
Constructor Details
-
Method Details
-
executeGoal
public void executeGoal(String pluginKey, String goal) throws org.apache.maven.plugin.MojoExecutionException Executes the given goal from the given plugin coordinates.- Parameters:
pluginKey- The plugin coordinates in the format groupId:artifactId:versiongoal- The goal to execute- Throws:
org.apache.maven.plugin.MojoExecutionException- If the goal execution fails
-
executeGoal
public void executeGoal(String pluginGroup, String pluginArtifact, String pluginVersion, String goal, org.codehaus.plexus.util.xml.Xpp3Dom configuration) throws org.apache.maven.plugin.MojoExecutionException Executes a goal using the given arguments.- Parameters:
pluginGroup- plugin group idpluginArtifact- plugin artifact idpluginVersion- plugin versiongoal- goal to executeconfiguration- configuration for the goal- Throws:
org.apache.maven.plugin.MojoExecutionException- if the goal execution fails
-
invokeGoal
public org.apache.maven.shared.invoker.InvocationResult invokeGoal(String pluginKey, String goal) throws org.apache.maven.shared.invoker.MavenInvocationException Executes a goal using the Maven shared invoker.- Parameters:
pluginKey- The plugin coordinates in the format groupId:artifactIdgoal- The goal to execute- Returns:
- The result of the invocation
- Throws:
org.apache.maven.shared.invoker.MavenInvocationException- If the goal execution fails
-
invokeGoals
public org.apache.maven.shared.invoker.InvocationResult invokeGoals(String... goals) throws org.apache.maven.shared.invoker.MavenInvocationException Executes a goal using the Maven shared invoker.- Parameters:
goals- The goals to execute- Returns:
- The result of the invocation
- Throws:
org.apache.maven.shared.invoker.MavenInvocationException- If the goal execution fails
-
invokeGoals
public org.apache.maven.shared.invoker.InvocationResult invokeGoals(org.apache.maven.project.MavenProject project, String... goals) throws org.apache.maven.shared.invoker.MavenInvocationException Executes a goal using the Maven shared invoker.- Parameters:
project- The Maven projectgoals- The goals to execute- Returns:
- The result of the invocation
- Throws:
org.apache.maven.shared.invoker.MavenInvocationException- If the goal execution fails
-