View Javadoc
1   /*
2    Licensed to the Apache Software Foundation (ASF) under one
3    or more contributor license agreements.  See the NOTICE file
4    distributed with this work for additional information
5    regarding copyright ownership.  The ASF licenses this file
6    to you under the Apache License, Version 2.0 (the
7    "License"); you may not use this file except in compliance
8    with the License.  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,
13   software distributed under the License is distributed on an
14   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   KIND, either express or implied.  See the License for the
16   specific language governing permissions and limitations
17   under the License.
18   =================== DO NOT EDIT THIS FILE ====================
19   Generated by Modello 2.5.1,
20   any modifications will be overwritten.
21   ==============================================================
22   */
23  
24  package org.apache.maven.model;
25  
26  /**
27   * Build configuration in a profile.
28   * 
29   * @version $Revision$ $Date$
30   */
31  @SuppressWarnings( "all" )
32  public class BuildBase
33      extends PluginConfiguration
34      implements java.io.Serializable, java.lang.Cloneable
35  {
36  
37        //--------------------------/
38       //- Class/Member Variables -/
39      //--------------------------/
40  
41      /**
42       * The default goal to execute when none is specified for
43       *             the project. In a multi-module build, only the
44       * default goal of the top-level
45       *             project is relevant. That is, the default goals
46       * of child modules are ignored.
47       *             Multiple goals can be separated by whitespace.
48       */
49      private String defaultGoal;
50  
51      /**
52       * Field resources.
53       */
54      private java.util.List<Resource> resources;
55  
56      /**
57       * Field testResources.
58       */
59      private java.util.List<Resource> testResources;
60  
61      /**
62       * 
63       *             The directory where all files generated by the
64       * build are placed.
65       *             The default value is <code>target</code>.
66       *           
67       */
68      private String directory;
69  
70      /**
71       * 
72       *             
73       *             The filename (excluding the extension, and with
74       * no path information) that
75       *             the produced artifact will be called.
76       *             The default value is
77       * <code>${artifactId}-${version}</code>.
78       *             
79       *           
80       */
81      private String finalName;
82  
83      /**
84       * Field filters.
85       */
86      private java.util.List<String> filters;
87  
88  
89        //-----------/
90       //- Methods -/
91      //-----------/
92  
93      /**
94       * Method addFilter.
95       * 
96       * @param string a string object.
97       */
98      public void addFilter( String string )
99      {
100         getFilters().add( string );
101     } //-- void addFilter( String )
102 
103     /**
104      * Method addResource.
105      * 
106      * @param resource a resource object.
107      */
108     public void addResource( Resource resource )
109     {
110         getResources().add( resource );
111     } //-- void addResource( Resource )
112 
113     /**
114      * Method addTestResource.
115      * 
116      * @param resource a resource object.
117      */
118     public void addTestResource( Resource resource )
119     {
120         getTestResources().add( resource );
121     } //-- void addTestResource( Resource )
122 
123     /**
124      * Method clone.
125      * 
126      * @return BuildBase
127      */
128     public BuildBase clone()
129     {
130         try
131         {
132             BuildBase copy = (BuildBase) super.clone();
133 
134             if ( this.resources != null )
135             {
136                 copy.resources = new java.util.ArrayList<Resource>();
137                 for ( Resource item : this.resources )
138                 {
139                     copy.resources.add( ( (Resource) item).clone() );
140                 }
141             }
142 
143             if ( this.testResources != null )
144             {
145                 copy.testResources = new java.util.ArrayList<Resource>();
146                 for ( Resource item : this.testResources )
147                 {
148                     copy.testResources.add( ( (Resource) item).clone() );
149                 }
150             }
151 
152             if ( this.filters != null )
153             {
154                 copy.filters = new java.util.ArrayList<String>();
155                 copy.filters.addAll( this.filters );
156             }
157 
158             return copy;
159         }
160         catch ( java.lang.Exception ex )
161         {
162             throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
163                 + " does not support clone()" ).initCause( ex );
164         }
165     } //-- BuildBase clone()
166 
167     /**
168      * Get the default goal to execute when none is specified for
169      *             the project. In a multi-module build, only the
170      * default goal of the top-level
171      *             project is relevant. That is, the default goals
172      * of child modules are ignored.
173      *             Multiple goals can be separated by whitespace.
174      * 
175      * @return String
176      */
177     public String getDefaultGoal()
178     {
179         return this.defaultGoal;
180     } //-- String getDefaultGoal()
181 
182     /**
183      * Get the directory where all files generated by the build are
184      * placed.
185      *             The default value is <code>target</code>.
186      * 
187      * @return String
188      */
189     public String getDirectory()
190     {
191         return this.directory;
192     } //-- String getDirectory()
193 
194     /**
195      * Method getFilters.
196      * 
197      * @return List
198      */
199     public java.util.List<String> getFilters()
200     {
201         if ( this.filters == null )
202         {
203             this.filters = new java.util.ArrayList<String>();
204         }
205 
206         return this.filters;
207     } //-- java.util.List<String> getFilters()
208 
209     /**
210      * Get the filename (excluding the extension, and with no path
211      * information) that
212      *             the produced artifact will be called.
213      *             The default value is
214      * <code>${artifactId}-${version}</code>.
215      * 
216      * @return String
217      */
218     public String getFinalName()
219     {
220         return this.finalName;
221     } //-- String getFinalName()
222 
223     /**
224      * Method getResources.
225      * 
226      * @return List
227      */
228     public java.util.List<Resource> getResources()
229     {
230         if ( this.resources == null )
231         {
232             this.resources = new java.util.ArrayList<Resource>();
233         }
234 
235         return this.resources;
236     } //-- java.util.List<Resource> getResources()
237 
238     /**
239      * Method getTestResources.
240      * 
241      * @return List
242      */
243     public java.util.List<Resource> getTestResources()
244     {
245         if ( this.testResources == null )
246         {
247             this.testResources = new java.util.ArrayList<Resource>();
248         }
249 
250         return this.testResources;
251     } //-- java.util.List<Resource> getTestResources()
252 
253     /**
254      * Method removeFilter.
255      * 
256      * @param string a string object.
257      */
258     public void removeFilter( String string )
259     {
260         getFilters().remove( string );
261     } //-- void removeFilter( String )
262 
263     /**
264      * Method removeResource.
265      * 
266      * @param resource a resource object.
267      */
268     public void removeResource( Resource resource )
269     {
270         getResources().remove( resource );
271     } //-- void removeResource( Resource )
272 
273     /**
274      * Method removeTestResource.
275      * 
276      * @param resource a resource object.
277      */
278     public void removeTestResource( Resource resource )
279     {
280         getTestResources().remove( resource );
281     } //-- void removeTestResource( Resource )
282 
283     /**
284      * Set the default goal to execute when none is specified for
285      *             the project. In a multi-module build, only the
286      * default goal of the top-level
287      *             project is relevant. That is, the default goals
288      * of child modules are ignored.
289      *             Multiple goals can be separated by whitespace.
290      * 
291      * @param defaultGoal a defaultGoal object.
292      */
293     public void setDefaultGoal( String defaultGoal )
294     {
295         this.defaultGoal = defaultGoal;
296     } //-- void setDefaultGoal( String )
297 
298     /**
299      * Set the directory where all files generated by the build are
300      * placed.
301      *             The default value is <code>target</code>.
302      * 
303      * @param directory a directory object.
304      */
305     public void setDirectory( String directory )
306     {
307         this.directory = directory;
308     } //-- void setDirectory( String )
309 
310     /**
311      * Set the list of filter properties files that are used when
312      * filtering is enabled.
313      * 
314      * @param filters a filters object.
315      */
316     public void setFilters( java.util.List<String> filters )
317     {
318         this.filters = filters;
319     } //-- void setFilters( java.util.List )
320 
321     /**
322      * Set the filename (excluding the extension, and with no path
323      * information) that
324      *             the produced artifact will be called.
325      *             The default value is
326      * <code>${artifactId}-${version}</code>.
327      * 
328      * @param finalName a finalName object.
329      */
330     public void setFinalName( String finalName )
331     {
332         this.finalName = finalName;
333     } //-- void setFinalName( String )
334 
335     /**
336      * Set this element describes all of the classpath resources
337      * such as properties
338      *             files associated with a project. These resources
339      * are often included in the final
340      *             package.
341      *             The default value is
342      * <code>src/main/resources</code>.
343      * 
344      * @param resources a resources object.
345      */
346     public void setResources( java.util.List<Resource> resources )
347     {
348         this.resources = resources;
349     } //-- void setResources( java.util.List )
350 
351     /**
352      * Set this element describes all of the classpath resources
353      * such as properties
354      *             files associated with a project's unit tests.
355      *             The default value is
356      * <code>src/test/resources</code>.
357      * 
358      * @param testResources a testResources object.
359      */
360     public void setTestResources( java.util.List<Resource> testResources )
361     {
362         this.testResources = testResources;
363     } //-- void setTestResources( java.util.List )
364 
365     
366             
367     /**
368      * @see java.lang.Object#toString()
369      */
370     public String toString()
371     {
372         return "BuildBase {" + super.toString() + "}";
373     }
374             
375           
376 }