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