Skip to main content

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

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;
    		}
    	}


Back to the top