View Javadoc

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