View Javadoc

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