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
24 import org.apache.maven.execution.MavenSession;
25 import org.apache.maven.model.Plugin;
26 import org.apache.maven.plugin.InvalidPluginDescriptorException;
27 import org.apache.maven.plugin.MojoExecution;
28 import org.apache.maven.plugin.MojoNotFoundException;
29 import org.apache.maven.plugin.PluginDescriptorParsingException;
30 import org.apache.maven.plugin.PluginManagerException;
31 import org.apache.maven.plugin.PluginNotFoundException;
32 import org.apache.maven.plugin.PluginResolutionException;
33 import org.apache.maven.plugin.prefix.NoPluginFoundForPrefixException;
34 import org.apache.maven.plugin.version.PluginVersionResolutionException;
35 import org.apache.maven.project.MavenProject;
36
37
38
39
40
41
42 public interface LifecycleExecutor {
43
44
45 @Deprecated
46 String ROLE = LifecycleExecutor.class.getName();
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62 Set<Plugin> getPluginsBoundByDefaultToAllLifecycles(String packaging);
63
64 MavenExecutionPlan calculateExecutionPlan(MavenSession session, String... tasks)
65 throws PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException,
66 MojoNotFoundException, NoPluginFoundForPrefixException, InvalidPluginDescriptorException,
67 PluginManagerException, LifecyclePhaseNotFoundException, LifecycleNotFoundException,
68 PluginVersionResolutionException;
69
70 MavenExecutionPlan calculateExecutionPlan(MavenSession session, boolean setup, String... tasks)
71 throws PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException,
72 MojoNotFoundException, NoPluginFoundForPrefixException, InvalidPluginDescriptorException,
73 PluginManagerException, LifecyclePhaseNotFoundException, LifecycleNotFoundException,
74 PluginVersionResolutionException;
75
76 void execute(MavenSession session);
77
78
79 void calculateForkedExecutions(MojoExecution mojoExecution, MavenSession session)
80 throws MojoNotFoundException, PluginNotFoundException, PluginResolutionException,
81 PluginDescriptorParsingException, NoPluginFoundForPrefixException, InvalidPluginDescriptorException,
82 LifecyclePhaseNotFoundException, LifecycleNotFoundException, PluginVersionResolutionException;
83
84
85 List<MavenProject> executeForkedExecutions(MojoExecution mojoExecution, MavenSession session)
86 throws LifecycleExecutionException;
87 }