001package 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
022import org.apache.maven.execution.MavenSession;
023import org.apache.maven.lifecycle.LifecycleNotFoundException;
024import org.apache.maven.lifecycle.LifecyclePhaseNotFoundException;
025import org.apache.maven.plugin.InvalidPluginDescriptorException;
026import org.apache.maven.plugin.MojoNotFoundException;
027import org.apache.maven.plugin.PluginDescriptorParsingException;
028import org.apache.maven.plugin.PluginNotFoundException;
029import org.apache.maven.plugin.PluginResolutionException;
030import org.apache.maven.plugin.prefix.NoPluginFoundForPrefixException;
031import org.apache.maven.plugin.version.PluginVersionResolutionException;
032
033import java.util.List;
034
035/**
036 * Calculates the task segments in the build
037 * 
038 * @since 3.0
039 * @author Benjamin Bentmann
040 * @author Jason van Zyl
041 * @author jdcasey
042 * @author Kristian Rosenvold (extracted interface)
043 *         <p/>
044 *         NOTE: This interface is not part of any public api and can be changed or deleted without prior notice.
045 */
046
047public interface LifecycleTaskSegmentCalculator
048{
049    List<TaskSegment> calculateTaskSegments( MavenSession session )
050        throws PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException,
051        MojoNotFoundException, NoPluginFoundForPrefixException, InvalidPluginDescriptorException,
052        PluginVersionResolutionException, LifecyclePhaseNotFoundException, LifecycleNotFoundException;
053
054    List<TaskSegment> calculateTaskSegments( MavenSession session, List<String> tasks )
055        throws PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException,
056        MojoNotFoundException, NoPluginFoundForPrefixException, InvalidPluginDescriptorException,
057        PluginVersionResolutionException;
058
059    boolean requiresProject( MavenSession session );
060
061}