Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-dev] Problems navigating the execution plan

On Fri, Jan 14, 2011 at 10:35 PM, Igor Fedorenko <igor@xxxxxxxxxxxxxx> wrote:
> In 0.10.x and 0.12.x, mavenProjectFacade.getExecutionPlan(monitor) is
> expected to calculate execution plan up-to "package" phase inclusive
> (see #calculateExecutionPlan in [1]). It does not include "validate"
> phase. You need to call IMaven#calculateExecutionPlan from your code to
> get execution plan that includes "validate".

Thanks, Igor. that should get things off the ground here.



>
> In current master head we've changed mavenProjectFacade.getExecutionPlan
> to include all the way to "deploy" [2], so validate phase is included
> already.
>
> Also, beware that execution plan calculation is an expansive operation
> that may require remote repository access. We plan to change m2e core to
> avoid using it but instead only resolve "interesting" individual plugin
> executions. See MNGECLIPSE-2724 [3] for more info.
>
>
> [1]
> https://github.com/sonatype/m2e-core-tests/blob/rb-0.12.x/org.maven.ide.eclipse/src/org/maven/ide/eclipse/internal/project/registry/ProjectRegistryManager.java
>
> [2]
> http://git.eclipse.org/c/m2e/m2e-core.git/tree/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/ProjectRegistryManager.java
>
> [3] https://issues.sonatype.org/browse/MNGECLIPSE-2724
> --
> Regards,
> Igor
>
> On 11-01-14 07:38 PM, Benson Margulies wrote:
>>
>> In handing project config change requests, my plugin receives an
>> IMavenProjectFacade from M2E.
>>
>> Some phases seem to be trimmed out of there. In particularly, my users
>> complain that I'm failing to pay attention if their POM configures the
>> plugin in the 'verify' phase.
>>
>> The idea here is that I want to collect the effective configuration of
>> their actually configured execution of some specific goal of
>> checkstyle or findbugs.
>>
>> Can you suggest some alternative to the following that is likely to be
>> more satisfactory?
>>
>> Do I need to somehow ask maven to build a 'vanilla' execution plan
>> that I can then traverse?
>>
>> MavenExecutionPlan executionPlan =
>> mavenProjectFacade.getExecutionPlan(monitor);
>>        List<MojoExecution>  mojoExecutions =
>> executionPlan.getMojoExecutions();
>>        for (MojoExecution mojoExecution : mojoExecutions) {
>>                if(mojoExecutionForPlugin(mojoExecution, pluginGroupId,
>> pluginArtifactId, pluginGoal)) {
>>                        return mojoExecution;
>>                }
>>        }
>> _______________________________________________
>> m2e-dev mailing list
>> m2e-dev@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/m2e-dev
>
> _______________________________________________
> m2e-dev mailing list
> m2e-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/m2e-dev
>


Back to the top