use of org.apache.maven.lifecycle.MavenExecutionPlan in project bndtools by bndtools.
the class BndConfigurator method execJarMojo.
private void execJarMojo(IMavenProjectFacade projectFacade, IProgressMonitor monitor) throws CoreException {
MavenProject mavenProject = projectFacade.getMavenProject();
if (mavenProject == null) {
mavenProject = projectFacade.getMavenProject(monitor);
}
final IMaven maven = MavenPlugin.getMaven();
final MavenExecutionPlan plan = maven.calculateExecutionPlan(mavenProject, Arrays.asList("jar:jar"), true, monitor);
final List<MojoExecution> mojoExecutions = plan.getMojoExecutions();
if (mojoExecutions != null) {
for (MojoExecution mojoExecution : mojoExecutions) {
MavenPlugin.getMaven().execute(mavenProject, mojoExecution, monitor);
}
}
}
Aggregations