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