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