001// =================== DO NOT EDIT THIS FILE ====================
002// Generated by Modello 1.8.3,
003// any modifications will be overwritten.
004// ==============================================================
005
006package org.apache.maven.model;
007
008/**
009 * Generic informations for a build.
010 * 
011 * @version $Revision: 965443 $ $Date: 2015-09-14 22:18:52 +0000 (Mon, 14 Sep 2015) $
012 */
013@SuppressWarnings( "all" )
014public 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     * 
047     *             The directory where all files generated by the
048     * build are placed.
049     *             The default value is <code>target</code>.
050     *           
051     */
052    private String directory;
053
054    /**
055     * 
056     *             
057     *             The filename (excluding the extension, and with
058     * no path information) that
059     *             the produced artifact will be called.
060     *             The default value is
061     * <code>${artifactId}-${version}</code>.
062     *             
063     *           
064     */
065    private String finalName;
066
067    /**
068     * Field filters.
069     */
070    private java.util.List<String> filters;
071
072
073      //-----------/
074     //- Methods -/
075    //-----------/
076
077    /**
078     * Method addFilter.
079     * 
080     * @param string
081     */
082    public void addFilter( String string )
083    {
084        getFilters().add( string );
085    } //-- void addFilter( String )
086
087    /**
088     * Method addResource.
089     * 
090     * @param resource
091     */
092    public void addResource( Resource resource )
093    {
094        getResources().add( resource );
095    } //-- void addResource( Resource )
096
097    /**
098     * Method addTestResource.
099     * 
100     * @param resource
101     */
102    public void addTestResource( Resource resource )
103    {
104        getTestResources().add( resource );
105    } //-- void addTestResource( Resource )
106
107    /**
108     * Method clone.
109     * 
110     * @return BuildBase
111     */
112    public BuildBase clone()
113    {
114        try
115        {
116            BuildBase copy = (BuildBase) super.clone();
117
118            if ( this.resources != null )
119            {
120                copy.resources = new java.util.ArrayList<Resource>();
121                for ( Resource item : this.resources )
122                {
123                    copy.resources.add( ( (Resource) item).clone() );
124                }
125            }
126
127            if ( this.testResources != null )
128            {
129                copy.testResources = new java.util.ArrayList<Resource>();
130                for ( Resource item : this.testResources )
131                {
132                    copy.testResources.add( ( (Resource) item).clone() );
133                }
134            }
135
136            if ( this.filters != null )
137            {
138                copy.filters = new java.util.ArrayList<String>();
139                copy.filters.addAll( this.filters );
140            }
141
142            return copy;
143        }
144        catch ( java.lang.Exception ex )
145        {
146            throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
147                + " does not support clone()" ).initCause( ex );
148        }
149    } //-- BuildBase clone()
150
151    /**
152     * Get the default goal (or phase in Maven 2) to execute when
153     * none is specified for
154     *             the project. Note that in case of a multi-module
155     * build, only the default goal of the top-level
156     *             project is relevant, i.e. the default goals of
157     * child modules are ignored. Since Maven 3,
158     *             multiple goals/phases can be separated by
159     * whitespace.
160     * 
161     * @return String
162     */
163    public String getDefaultGoal()
164    {
165        return this.defaultGoal;
166    } //-- String getDefaultGoal()
167
168    /**
169     * Get the directory where all files generated by the build are
170     * placed.
171     *             The default value is <code>target</code>.
172     * 
173     * @return String
174     */
175    public String getDirectory()
176    {
177        return this.directory;
178    } //-- String getDirectory()
179
180    /**
181     * Method getFilters.
182     * 
183     * @return List
184     */
185    public java.util.List<String> getFilters()
186    {
187        if ( this.filters == null )
188        {
189            this.filters = new java.util.ArrayList<String>();
190        }
191
192        return this.filters;
193    } //-- java.util.List<String> getFilters()
194
195    /**
196     * Get the filename (excluding the extension, and with no path
197     * information) that
198     *             the produced artifact will be called.
199     *             The default value is
200     * <code>${artifactId}-${version}</code>.
201     * 
202     * @return String
203     */
204    public String getFinalName()
205    {
206        return this.finalName;
207    } //-- String getFinalName()
208
209    /**
210     * Method getResources.
211     * 
212     * @return List
213     */
214    public java.util.List<Resource> getResources()
215    {
216        if ( this.resources == null )
217        {
218            this.resources = new java.util.ArrayList<Resource>();
219        }
220
221        return this.resources;
222    } //-- java.util.List<Resource> getResources()
223
224    /**
225     * Method getTestResources.
226     * 
227     * @return List
228     */
229    public java.util.List<Resource> getTestResources()
230    {
231        if ( this.testResources == null )
232        {
233            this.testResources = new java.util.ArrayList<Resource>();
234        }
235
236        return this.testResources;
237    } //-- java.util.List<Resource> getTestResources()
238
239    /**
240     * Method removeFilter.
241     * 
242     * @param string
243     */
244    public void removeFilter( String string )
245    {
246        getFilters().remove( string );
247    } //-- void removeFilter( String )
248
249    /**
250     * Method removeResource.
251     * 
252     * @param resource
253     */
254    public void removeResource( Resource resource )
255    {
256        getResources().remove( resource );
257    } //-- void removeResource( Resource )
258
259    /**
260     * Method removeTestResource.
261     * 
262     * @param resource
263     */
264    public void removeTestResource( Resource resource )
265    {
266        getTestResources().remove( resource );
267    } //-- void removeTestResource( Resource )
268
269    /**
270     * Set the default goal (or phase in Maven 2) to execute when
271     * none is specified for
272     *             the project. Note that in case of a multi-module
273     * build, only the default goal of the top-level
274     *             project is relevant, i.e. the default goals of
275     * child modules are ignored. Since Maven 3,
276     *             multiple goals/phases can be separated by
277     * whitespace.
278     * 
279     * @param defaultGoal
280     */
281    public void setDefaultGoal( String defaultGoal )
282    {
283        this.defaultGoal = defaultGoal;
284    } //-- void setDefaultGoal( String )
285
286    /**
287     * Set the directory where all files generated by the build are
288     * placed.
289     *             The default value is <code>target</code>.
290     * 
291     * @param directory
292     */
293    public void setDirectory( String directory )
294    {
295        this.directory = directory;
296    } //-- void setDirectory( String )
297
298    /**
299     * Set the list of filter properties files that are used when
300     * filtering is enabled.
301     * 
302     * @param filters
303     */
304    public void setFilters( java.util.List<String> filters )
305    {
306        this.filters = filters;
307    } //-- void setFilters( java.util.List )
308
309    /**
310     * Set the filename (excluding the extension, and with no path
311     * information) that
312     *             the produced artifact will be called.
313     *             The default value is
314     * <code>${artifactId}-${version}</code>.
315     * 
316     * @param finalName
317     */
318    public void setFinalName( String finalName )
319    {
320        this.finalName = finalName;
321    } //-- void setFinalName( String )
322
323    /**
324     * Set this element describes all of the classpath resources
325     * such as properties
326     *             files associated with a project. These resources
327     * are often included in the final
328     *             package.
329     *             The default value is
330     * <code>src/main/resources</code>.
331     * 
332     * @param resources
333     */
334    public void setResources( java.util.List<Resource> resources )
335    {
336        this.resources = resources;
337    } //-- void setResources( java.util.List )
338
339    /**
340     * Set this element describes all of the classpath resources
341     * such as properties
342     *             files associated with a project's unit tests.
343     *             The default value is
344     * <code>src/test/resources</code>.
345     * 
346     * @param testResources
347     */
348    public void setTestResources( java.util.List<Resource> testResources )
349    {
350        this.testResources = testResources;
351    } //-- void setTestResources( java.util.List )
352
353}