View Javadoc
1   // =================== DO NOT EDIT THIS FILE ====================
2   // Generated by Modello 1.11,
3   // any modifications will be overwritten.
4   // ==============================================================
5   
6   package org.apache.maven.model;
7   
8   /**
9    * 
10   *         
11   *         The <code>&lt;build&gt;</code> element contains
12   * informations required to build the project.
13   *         Default values are defined in Super POM.
14   *         
15   *       
16   * 
17   * @version $Revision$ $Date$
18   */
19  @SuppressWarnings( "all" )
20  public class Build
21      extends BuildBase
22      implements java.io.Serializable, java.lang.Cloneable
23  {
24  
25        //--------------------------/
26       //- Class/Member Variables -/
27      //--------------------------/
28  
29      /**
30       * 
31       *             This element specifies a directory containing
32       * the source of the project. The
33       *             generated build system will compile the sources
34       * from this directory when the project is
35       *             built. The path given is relative to the project
36       * descriptor.
37       *             The default value is <code>src/main/java</code>.
38       *           
39       */
40      private String sourceDirectory;
41  
42      /**
43       * 
44       *             This element specifies a directory containing
45       * the script sources of the
46       *             project. This directory is meant to be different
47       * from the sourceDirectory, in that its
48       *             contents will be copied to the output directory
49       * in most cases (since scripts are
50       *             interpreted rather than compiled).
51       *             The default value is
52       * <code>src/main/scripts</code>.
53       *           
54       */
55      private String scriptSourceDirectory;
56  
57      /**
58       * 
59       *             This element specifies a directory containing
60       * the unit test source of the
61       *             project. The generated build system will compile
62       * these directories when the project is
63       *             being tested. The path given is relative to the
64       * project descriptor.
65       *             The default value is <code>src/test/java</code>.
66       *           
67       */
68      private String testSourceDirectory;
69  
70      /**
71       * 
72       *             The directory where compiled application classes
73       * are placed.
74       *             The default value is
75       * <code>target/classes</code>.
76       *           
77       */
78      private String outputDirectory;
79  
80      /**
81       * 
82       *             The directory where compiled test classes are
83       * placed.
84       *             The default value is
85       * <code>target/test-classes</code>.
86       *           
87       */
88      private String testOutputDirectory;
89  
90      /**
91       * Field extensions.
92       */
93      private java.util.List<Extension> extensions;
94  
95  
96        //-----------/
97       //- Methods -/
98      //-----------/
99  
100     /**
101      * Method addExtension.
102      * 
103      * @param extension
104      */
105     public void addExtension( Extension extension )
106     {
107         getExtensions().add( extension );
108     } //-- void addExtension( Extension )
109 
110     /**
111      * Method clone.
112      * 
113      * @return Build
114      */
115     public Build clone()
116     {
117         try
118         {
119             Build copy = (Build) super.clone();
120 
121             if ( this.extensions != null )
122             {
123                 copy.extensions = new java.util.ArrayList<Extension>();
124                 for ( Extension item : this.extensions )
125                 {
126                     copy.extensions.add( ( (Extension) item).clone() );
127                 }
128             }
129 
130             return copy;
131         }
132         catch ( java.lang.Exception ex )
133         {
134             throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
135                 + " does not support clone()" ).initCause( ex );
136         }
137     } //-- Build clone()
138 
139     /**
140      * Method getExtensions.
141      * 
142      * @return List
143      */
144     public java.util.List<Extension> getExtensions()
145     {
146         if ( this.extensions == null )
147         {
148             this.extensions = new java.util.ArrayList<Extension>();
149         }
150 
151         return this.extensions;
152     } //-- java.util.List<Extension> getExtensions()
153 
154     /**
155      * Get the directory where compiled application classes are
156      * placed.
157      *             The default value is
158      * <code>target/classes</code>.
159      * 
160      * @return String
161      */
162     public String getOutputDirectory()
163     {
164         return this.outputDirectory;
165     } //-- String getOutputDirectory()
166 
167     /**
168      * Get this element specifies a directory containing the script
169      * sources of the
170      *             project. This directory is meant to be different
171      * from the sourceDirectory, in that its
172      *             contents will be copied to the output directory
173      * in most cases (since scripts are
174      *             interpreted rather than compiled).
175      *             The default value is
176      * <code>src/main/scripts</code>.
177      * 
178      * @return String
179      */
180     public String getScriptSourceDirectory()
181     {
182         return this.scriptSourceDirectory;
183     } //-- String getScriptSourceDirectory()
184 
185     /**
186      * Get this element specifies a directory containing the source
187      * of the project. The
188      *             generated build system will compile the sources
189      * from this directory when the project is
190      *             built. The path given is relative to the project
191      * descriptor.
192      *             The default value is <code>src/main/java</code>.
193      * 
194      * @return String
195      */
196     public String getSourceDirectory()
197     {
198         return this.sourceDirectory;
199     } //-- String getSourceDirectory()
200 
201     /**
202      * Get the directory where compiled test classes are placed.
203      *             The default value is
204      * <code>target/test-classes</code>.
205      * 
206      * @return String
207      */
208     public String getTestOutputDirectory()
209     {
210         return this.testOutputDirectory;
211     } //-- String getTestOutputDirectory()
212 
213     /**
214      * Get this element specifies a directory containing the unit
215      * test source of the
216      *             project. The generated build system will compile
217      * these directories when the project is
218      *             being tested. The path given is relative to the
219      * project descriptor.
220      *             The default value is <code>src/test/java</code>.
221      * 
222      * @return String
223      */
224     public String getTestSourceDirectory()
225     {
226         return this.testSourceDirectory;
227     } //-- String getTestSourceDirectory()
228 
229     /**
230      * Method removeExtension.
231      * 
232      * @param extension
233      */
234     public void removeExtension( Extension extension )
235     {
236         getExtensions().remove( extension );
237     } //-- void removeExtension( Extension )
238 
239     /**
240      * Set a set of build extensions to use from this project.
241      * 
242      * @param extensions
243      */
244     public void setExtensions( java.util.List<Extension> extensions )
245     {
246         this.extensions = extensions;
247     } //-- void setExtensions( java.util.List )
248 
249     /**
250      * Set the directory where compiled application classes are
251      * placed.
252      *             The default value is
253      * <code>target/classes</code>.
254      * 
255      * @param outputDirectory
256      */
257     public void setOutputDirectory( String outputDirectory )
258     {
259         this.outputDirectory = outputDirectory;
260     } //-- void setOutputDirectory( String )
261 
262     /**
263      * Set this element specifies a directory containing the script
264      * sources of the
265      *             project. This directory is meant to be different
266      * from the sourceDirectory, in that its
267      *             contents will be copied to the output directory
268      * in most cases (since scripts are
269      *             interpreted rather than compiled).
270      *             The default value is
271      * <code>src/main/scripts</code>.
272      * 
273      * @param scriptSourceDirectory
274      */
275     public void setScriptSourceDirectory( String scriptSourceDirectory )
276     {
277         this.scriptSourceDirectory = scriptSourceDirectory;
278     } //-- void setScriptSourceDirectory( String )
279 
280     /**
281      * Set this element specifies a directory containing the source
282      * of the project. The
283      *             generated build system will compile the sources
284      * from this directory when the project is
285      *             built. The path given is relative to the project
286      * descriptor.
287      *             The default value is <code>src/main/java</code>.
288      * 
289      * @param sourceDirectory
290      */
291     public void setSourceDirectory( String sourceDirectory )
292     {
293         this.sourceDirectory = sourceDirectory;
294     } //-- void setSourceDirectory( String )
295 
296     /**
297      * Set the directory where compiled test classes are placed.
298      *             The default value is
299      * <code>target/test-classes</code>.
300      * 
301      * @param testOutputDirectory
302      */
303     public void setTestOutputDirectory( String testOutputDirectory )
304     {
305         this.testOutputDirectory = testOutputDirectory;
306     } //-- void setTestOutputDirectory( String )
307 
308     /**
309      * Set this element specifies a directory containing the unit
310      * test source of the
311      *             project. The generated build system will compile
312      * these directories when the project is
313      *             being tested. The path given is relative to the
314      * project descriptor.
315      *             The default value is <code>src/test/java</code>.
316      * 
317      * @param testSourceDirectory
318      */
319     public void setTestSourceDirectory( String testSourceDirectory )
320     {
321         this.testSourceDirectory = testSourceDirectory;
322     } //-- void setTestSourceDirectory( String )
323 
324     
325             
326     /**
327      * @see java.lang.Object#toString()
328      */
329     public String toString()
330     {
331         return "Build {" + super.toString() + "}";
332     }
333             
334           
335 }