001    // =================== DO NOT EDIT THIS FILE ====================
002    // Generated by Modello 1.7,
003    // any modifications will be overwritten.
004    // ==============================================================
005    
006    package org.apache.maven.model;
007    
008    /**
009     * Generic informations for a build.
010     * 
011     * @version $Revision$ $Date$
012     */
013    @SuppressWarnings( "all" )
014    public class BuildBase
015        extends PluginConfiguration
016        implements java.io.Serializable, java.lang.Cloneable
017    {
018    
019          //--------------------------/
020         //- Class/Member Variables -/
021        //--------------------------/
022    
023        /**
024         * The default goal (or phase in Maven 2) to execute when none
025         * is specified for
026         *             the project. Note that in case of a multi-module
027         * build, only the default goal of the top-level
028         *             project is relevant, i.e. the default goals of
029         * child modules are ignored. Since Maven 3,
030         *             multiple goals/phases can be separated by
031         * whitespace.
032         */
033        private String defaultGoal;
034    
035        /**
036         * Field resources.
037         */
038        private java.util.List<Resource> resources;
039    
040        /**
041         * Field testResources.
042         */
043        private java.util.List<Resource> testResources;
044    
045        /**
046         * The directory where all files generated by the build are
047         * placed.
048         */
049        private String directory;
050    
051        /**
052         * 
053         *             
054         *             The filename (excluding the extension, and with
055         * no path information) that
056         *             the produced artifact will be called.
057         *             The default value is
058         * <code>${artifactId}-${version}</code>.
059         *             
060         *           
061         */
062        private String finalName;
063    
064        /**
065         * Field filters.
066         */
067        private java.util.List<String> filters;
068    
069    
070          //-----------/
071         //- Methods -/
072        //-----------/
073    
074        /**
075         * Method addFilter.
076         * 
077         * @param string
078         */
079        public void addFilter( String string )
080        {
081            getFilters().add( string );
082        } //-- void addFilter( String )
083    
084        /**
085         * Method addResource.
086         * 
087         * @param resource
088         */
089        public void addResource( Resource resource )
090        {
091            getResources().add( resource );
092        } //-- void addResource( Resource )
093    
094        /**
095         * Method addTestResource.
096         * 
097         * @param resource
098         */
099        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    }