KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > maven > plugin > MojoExecution


1 package org.apache.maven.plugin;
2
3 /*
4  * Copyright 2001-2005 The Apache Software Foundation.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */

18
19 import org.apache.maven.plugin.descriptor.MojoDescriptor;
20 import org.codehaus.plexus.util.xml.Xpp3Dom;
21
22 import java.util.ArrayList JavaDoc;
23 import java.util.List JavaDoc;
24
25 /**
26  * Describes a single mojo invocation.
27  *
28  * @author <a HREF="mailto:brett@apache.org">Brett Porter</a>
29  * @version $Id$
30  */

31 public class MojoExecution
32 {
33     private final String JavaDoc executionId;
34
35     private final MojoDescriptor mojoDescriptor;
36
37     private Xpp3Dom configuration;
38
39     private List JavaDoc forkedExecutions = new ArrayList JavaDoc();
40
41     private List JavaDoc reports;
42
43     public MojoExecution( MojoDescriptor mojoDescriptor )
44     {
45         this.mojoDescriptor = mojoDescriptor;
46         this.executionId = null;
47         this.configuration = null;
48     }
49
50     public MojoExecution( MojoDescriptor mojoDescriptor, String JavaDoc executionId )
51     {
52         this.mojoDescriptor = mojoDescriptor;
53         this.executionId = executionId;
54         this.configuration = null;
55     }
56
57     public MojoExecution( MojoDescriptor mojoDescriptor, Xpp3Dom configuration )
58     {
59         this.mojoDescriptor = mojoDescriptor;
60         this.configuration = configuration;
61         this.executionId = null;
62     }
63
64     public String JavaDoc getExecutionId()
65     {
66         return executionId;
67     }
68
69     public MojoDescriptor getMojoDescriptor()
70     {
71         return mojoDescriptor;
72     }
73
74     public Xpp3Dom getConfiguration()
75     {
76         return configuration;
77     }
78
79     public void addMojoExecution( MojoExecution execution )
80     {
81         forkedExecutions.add( execution );
82     }
83
84     public void setReports( List JavaDoc reports )
85     {
86         this.reports = reports;
87     }
88
89     public List JavaDoc getReports()
90     {
91         return reports;
92     }
93
94     public List JavaDoc getForkedExecutions()
95     {
96         return forkedExecutions;
97     }
98
99     public void setConfiguration( Xpp3Dom configuration )
100     {
101         this.configuration = configuration;
102     }
103 }
104
Popular Tags