001 package org.apache.maven.lifecycle.internal;
002
003 /*
004 * Licensed to the Apache Software Foundation (ASF) under one
005 * or more contributor license agreements. See the NOTICE file
006 * distributed with this work for additional information
007 * regarding copyright ownership. The ASF licenses this file
008 * to you under the Apache License, Version 2.0 (the
009 * "License"); you may not use this file except in compliance
010 * with the License. You may obtain a copy of the License at
011 *
012 * http://www.apache.org/licenses/LICENSE-2.0
013 *
014 * Unless required by applicable law or agreed to in writing,
015 * software distributed under the License is distributed on an
016 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
017 * KIND, either express or implied. See the License for the
018 * specific language governing permissions and limitations
019 * under the License.
020 */
021
022 import org.apache.maven.execution.MavenSession;
023 import org.apache.maven.lifecycle.LifecycleNotFoundException;
024 import org.apache.maven.lifecycle.LifecyclePhaseNotFoundException;
025 import org.apache.maven.lifecycle.MavenExecutionPlan;
026 import org.apache.maven.plugin.InvalidPluginDescriptorException;
027 import org.apache.maven.plugin.MojoExecution;
028 import org.apache.maven.plugin.MojoNotFoundException;
029 import org.apache.maven.plugin.PluginDescriptorParsingException;
030 import org.apache.maven.plugin.PluginNotFoundException;
031 import org.apache.maven.plugin.PluginResolutionException;
032 import org.apache.maven.plugin.prefix.NoPluginFoundForPrefixException;
033 import org.apache.maven.plugin.version.PluginVersionResolutionException;
034 import org.apache.maven.project.MavenProject;
035
036 import java.util.List;
037
038 /**
039 * @since 3.0
040 * @author Benjamin Bentmann
041 * @author Kristian Rosenvold (extract interface only)
042 * <p/>
043 */
044 public interface LifecycleExecutionPlanCalculator
045 {
046 MavenExecutionPlan calculateExecutionPlan( MavenSession session, MavenProject project, List<Object> tasks )
047 throws PluginNotFoundException, PluginResolutionException, LifecyclePhaseNotFoundException,
048 PluginDescriptorParsingException, MojoNotFoundException, InvalidPluginDescriptorException,
049 NoPluginFoundForPrefixException, LifecycleNotFoundException, PluginVersionResolutionException;
050
051 MavenExecutionPlan calculateExecutionPlan( MavenSession session, MavenProject project, List<Object> tasks,
052 boolean setup )
053 throws PluginNotFoundException, PluginResolutionException, LifecyclePhaseNotFoundException,
054 PluginDescriptorParsingException, MojoNotFoundException, InvalidPluginDescriptorException,
055 NoPluginFoundForPrefixException, LifecycleNotFoundException, PluginVersionResolutionException;
056
057 void calculateForkedExecutions( MojoExecution mojoExecution, MavenSession session )
058 throws MojoNotFoundException, PluginNotFoundException, PluginResolutionException,
059 PluginDescriptorParsingException, NoPluginFoundForPrefixException, InvalidPluginDescriptorException,
060 LifecyclePhaseNotFoundException, LifecycleNotFoundException, PluginVersionResolutionException;
061
062 void setupMojoExecution( MavenSession session, MavenProject project, MojoExecution mojoExecution )
063 throws PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException,
064 MojoNotFoundException, InvalidPluginDescriptorException, NoPluginFoundForPrefixException,
065 LifecyclePhaseNotFoundException, LifecycleNotFoundException, PluginVersionResolutionException;
066
067 }