List of usage examples for org.apache.maven.lifecycle LifecycleExecutor calculateExecutionPlan
MavenExecutionPlan calculateExecutionPlan(MavenSession session, boolean setup, String... tasks) throws PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException, MojoNotFoundException, NoPluginFoundForPrefixException, InvalidPluginDescriptorException, PluginManagerException, LifecyclePhaseNotFoundException, LifecycleNotFoundException, PluginVersionResolutionException;
From source file:org.sonarsource.scanner.maven.bootstrap.JavaVersionResolver.java
License:Open Source License
public JavaVersionResolver(MavenSession session, LifecycleExecutor lifecycleExecutor, Log log) { this.session = session; this.log = log; this.mojoExecutions = new LinkedList<>(); try {//w w w. j av a 2 s . c o m this.mojoExecutions = lifecycleExecutor.calculateExecutionPlan(session, true, COMPILE_GOAL) .getMojoExecutions(); } catch (Exception e) { log.warn( String.format("Failed to get mojo executions for goal '%s': %s", COMPILE_GOAL, e.getMessage())); } }