1   
2   
3   
4   
5   
6   
7   
8   
9   
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  package org.apache.maven.lifecycle;
20  
21  import java.util.List;
22  import java.util.Set;
23  import org.apache.maven.execution.MavenSession;
24  import org.apache.maven.model.Plugin;
25  import org.apache.maven.plugin.InvalidPluginDescriptorException;
26  import org.apache.maven.plugin.MojoExecution;
27  import org.apache.maven.plugin.MojoNotFoundException;
28  import org.apache.maven.plugin.PluginDescriptorParsingException;
29  import org.apache.maven.plugin.PluginManagerException;
30  import org.apache.maven.plugin.PluginNotFoundException;
31  import org.apache.maven.plugin.PluginResolutionException;
32  import org.apache.maven.plugin.prefix.NoPluginFoundForPrefixException;
33  import org.apache.maven.plugin.version.PluginVersionResolutionException;
34  import org.apache.maven.project.MavenProject;
35  
36  
37  
38  
39  
40  
41  public interface LifecycleExecutor {
42  
43      
44      @Deprecated
45      String ROLE = LifecycleExecutor.class.getName();
46  
47      
48      
49      
50      
51      
52      
53      
54      
55      
56  
57      
58  
59  
60  
61      Set<Plugin> getPluginsBoundByDefaultToAllLifecycles(String packaging);
62  
63      MavenExecutionPlan calculateExecutionPlan(MavenSession session, String... tasks)
64              throws PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException,
65                      MojoNotFoundException, NoPluginFoundForPrefixException, InvalidPluginDescriptorException,
66                      PluginManagerException, LifecyclePhaseNotFoundException, LifecycleNotFoundException,
67                      PluginVersionResolutionException;
68  
69      MavenExecutionPlan calculateExecutionPlan(MavenSession session, boolean setup, String... tasks)
70              throws PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException,
71                      MojoNotFoundException, NoPluginFoundForPrefixException, InvalidPluginDescriptorException,
72                      PluginManagerException, LifecyclePhaseNotFoundException, LifecycleNotFoundException,
73                      PluginVersionResolutionException;
74  
75      void execute(MavenSession session);
76  
77      
78      void calculateForkedExecutions(MojoExecution mojoExecution, MavenSession session)
79              throws MojoNotFoundException, PluginNotFoundException, PluginResolutionException,
80                      PluginDescriptorParsingException, NoPluginFoundForPrefixException, InvalidPluginDescriptorException,
81                      LifecyclePhaseNotFoundException, LifecycleNotFoundException, PluginVersionResolutionException;
82  
83      
84      List<MavenProject> executeForkedExecutions(MojoExecution mojoExecution, MavenSession session)
85              throws LifecycleExecutionException;
86  }