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 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 }