Search in sources :

Example 11 with MojoDescriptor

use of org.apache.maven.plugin.descriptor.MojoDescriptor in project intellij-plugins by JetBrains.

the class IdeaConfigurationMojo method createMojoExecution.

private MojoExecution createMojoExecution(Plugin plugin, String goal, MavenProject project) throws Exception {
    MojoDescriptor mojoDescriptor = pluginManager.getMojoDescriptor(plugin, goal, project.getRemotePluginRepositories(), session.getRepositorySession());
    MojoExecution mojoExecution = new MojoExecution(mojoDescriptor, "default-cli", MojoExecution.Source.CLI);
    lifeCycleExecutionPlanCalculator.setupMojoExecution(session, project, mojoExecution);
    return mojoExecution;
}
Also used : MojoDescriptor(org.apache.maven.plugin.descriptor.MojoDescriptor)

Aggregations

MojoDescriptor (org.apache.maven.plugin.descriptor.MojoDescriptor)11 MojoFailureException (org.apache.maven.plugin.MojoFailureException)4 PluginDescriptor (org.apache.maven.plugin.descriptor.PluginDescriptor)4 IOException (java.io.IOException)3 MojoExecution (org.apache.maven.plugin.MojoExecution)3 MojoExecutionException (org.apache.maven.plugin.MojoExecutionException)3 Parameter (org.apache.maven.plugin.descriptor.Parameter)3 InvocationTargetException (java.lang.reflect.InvocationTargetException)2 NoPluginFoundForPrefixException (org.apache.maven.plugin.prefix.NoPluginFoundForPrefixException)2 PluginVersionResolutionException (org.apache.maven.plugin.version.PluginVersionResolutionException)2 File (java.io.File)1 StringWriter (java.io.StringWriter)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1 StringTokenizer (java.util.StringTokenizer)1 Artifact (org.apache.maven.artifact.Artifact)1 Lifecycle (org.apache.maven.lifecycle.Lifecycle)1 LifecycleExecutionPlanCalculator (org.apache.maven.lifecycle.internal.LifecycleExecutionPlanCalculator)1 MailingList (org.apache.maven.model.MailingList)1 PluginExecution (org.apache.maven.model.PluginExecution)1