1 | |
package org.apache.maven.plugin; |
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.plugin.descriptor.MojoDescriptor; |
23 | |
import org.codehaus.plexus.util.xml.Xpp3Dom; |
24 | |
|
25 | |
import java.util.ArrayList; |
26 | |
import java.util.List; |
27 | |
|
28 | |
|
29 | |
|
30 | |
|
31 | |
|
32 | |
|
33 | |
|
34 | |
public class MojoExecution |
35 | |
{ |
36 | |
private final String executionId; |
37 | |
|
38 | |
private final MojoDescriptor mojoDescriptor; |
39 | |
|
40 | |
private Xpp3Dom configuration; |
41 | |
|
42 | 0 | private List forkedExecutions = new ArrayList(); |
43 | |
|
44 | |
private List reports; |
45 | |
|
46 | |
public MojoExecution( MojoDescriptor mojoDescriptor ) |
47 | 0 | { |
48 | 0 | this.mojoDescriptor = mojoDescriptor; |
49 | 0 | this.executionId = null; |
50 | 0 | this.configuration = null; |
51 | 0 | } |
52 | |
|
53 | |
public MojoExecution( MojoDescriptor mojoDescriptor, String executionId ) |
54 | 0 | { |
55 | 0 | this.mojoDescriptor = mojoDescriptor; |
56 | 0 | this.executionId = executionId; |
57 | 0 | this.configuration = null; |
58 | 0 | } |
59 | |
|
60 | |
public MojoExecution( MojoDescriptor mojoDescriptor, Xpp3Dom configuration ) |
61 | 0 | { |
62 | 0 | this.mojoDescriptor = mojoDescriptor; |
63 | 0 | this.configuration = configuration; |
64 | 0 | this.executionId = null; |
65 | 0 | } |
66 | |
|
67 | |
public String getExecutionId() |
68 | |
{ |
69 | 0 | return executionId; |
70 | |
} |
71 | |
|
72 | |
public MojoDescriptor getMojoDescriptor() |
73 | |
{ |
74 | 0 | return mojoDescriptor; |
75 | |
} |
76 | |
|
77 | |
public Xpp3Dom getConfiguration() |
78 | |
{ |
79 | 0 | return configuration; |
80 | |
} |
81 | |
|
82 | |
public void addMojoExecution( MojoExecution execution ) |
83 | |
{ |
84 | 0 | forkedExecutions.add( execution ); |
85 | 0 | } |
86 | |
|
87 | |
public void setReports( List reports ) |
88 | |
{ |
89 | 0 | this.reports = reports; |
90 | 0 | } |
91 | |
|
92 | |
public List getReports() |
93 | |
{ |
94 | 0 | return reports; |
95 | |
} |
96 | |
|
97 | |
public List getForkedExecutions() |
98 | |
{ |
99 | 0 | return forkedExecutions; |
100 | |
} |
101 | |
|
102 | |
public void setConfiguration( Xpp3Dom configuration ) |
103 | |
{ |
104 | 0 | this.configuration = configuration; |
105 | 0 | } |
106 | |
} |