All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.maven.model.BuildBase Maven / Gradle / Ivy

There is a newer version: 3.1.2
Show newest version
// =================== DO NOT EDIT THIS FILE ====================
// Generated by Modello 1.7,
// any modifications will be overwritten.
// ==============================================================

package org.apache.maven.model;

/**
 * Generic informations for a build.
 * 
 * @version $Revision$ $Date$
 */
@SuppressWarnings( "all" )
public class BuildBase
    extends PluginConfiguration
    implements java.io.Serializable, java.lang.Cloneable
{

      //--------------------------/
     //- Class/Member Variables -/
    //--------------------------/

    /**
     * The default goal (or phase in Maven 2) to execute when none
     * is specified for
     *             the project. Note that in case of a multi-module
     * build, only the default goal of the top-level
     *             project is relevant, i.e. the default goals of
     * child modules are ignored. Since Maven 3,
     *             multiple goals/phases can be separated by
     * whitespace.
     */
    private String defaultGoal;

    /**
     * Field resources.
     */
    private java.util.List resources;

    /**
     * Field testResources.
     */
    private java.util.List testResources;

    /**
     * The directory where all files generated by the build are
     * placed.
     */
    private String directory;

    /**
     * 
     *             
     *             The filename (excluding the extension, and with
     * no path information) that
     *             the produced artifact will be called.
     *             The default value is
     * ${artifactId}-${version}.
     *             
     *           
     */
    private String finalName;

    /**
     * Field filters.
     */
    private java.util.List filters;


      //-----------/
     //- Methods -/
    //-----------/

    /**
     * Method addFilter.
     * 
     * @param string
     */
    public void addFilter( String string )
    {
        getFilters().add( string );
    } //-- void addFilter( String )

    /**
     * Method addResource.
     * 
     * @param resource
     */
    public void addResource( Resource resource )
    {
        getResources().add( resource );
    } //-- void addResource( Resource )

    /**
     * Method addTestResource.
     * 
     * @param resource
     */
    public void addTestResource( Resource resource )
    {
        getTestResources().add( resource );
    } //-- void addTestResource( Resource )

    /**
     * Method clone.
     * 
     * @return BuildBase
     */
    public BuildBase clone()
    {
        try
        {
            BuildBase copy = (BuildBase) super.clone();

            if ( this.resources != null )
            {
                copy.resources = new java.util.ArrayList();
                for ( Resource item : this.resources )
                {
                    copy.resources.add( ( (Resource) item).clone() );
                }
            }

            if ( this.testResources != null )
            {
                copy.testResources = new java.util.ArrayList();
                for ( Resource item : this.testResources )
                {
                    copy.testResources.add( ( (Resource) item).clone() );
                }
            }

            if ( this.filters != null )
            {
                copy.filters = new java.util.ArrayList();
                copy.filters.addAll( this.filters );
            }

            return copy;
        }
        catch ( java.lang.Exception ex )
        {
            throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
                + " does not support clone()" ).initCause( ex );
        }
    } //-- BuildBase clone()

    /**
     * Get the default goal (or phase in Maven 2) to execute when
     * none is specified for
     *             the project. Note that in case of a multi-module
     * build, only the default goal of the top-level
     *             project is relevant, i.e. the default goals of
     * child modules are ignored. Since Maven 3,
     *             multiple goals/phases can be separated by
     * whitespace.
     * 
     * @return String
     */
    public String getDefaultGoal()
    {
        return this.defaultGoal;
    } //-- String getDefaultGoal()

    /**
     * Get the directory where all files generated by the build are
     * placed.
     * 
     * @return String
     */
    public String getDirectory()
    {
        return this.directory;
    } //-- String getDirectory()

    /**
     * Method getFilters.
     * 
     * @return List
     */
    public java.util.List getFilters()
    {
        if ( this.filters == null )
        {
            this.filters = new java.util.ArrayList();
        }

        return this.filters;
    } //-- java.util.List getFilters()

    /**
     * Get the filename (excluding the extension, and with no path
     * information) that
     *             the produced artifact will be called.
     *             The default value is
     * ${artifactId}-${version}.
     * 
     * @return String
     */
    public String getFinalName()
    {
        return this.finalName;
    } //-- String getFinalName()

    /**
     * Method getResources.
     * 
     * @return List
     */
    public java.util.List getResources()
    {
        if ( this.resources == null )
        {
            this.resources = new java.util.ArrayList();
        }

        return this.resources;
    } //-- java.util.List getResources()

    /**
     * Method getTestResources.
     * 
     * @return List
     */
    public java.util.List getTestResources()
    {
        if ( this.testResources == null )
        {
            this.testResources = new java.util.ArrayList();
        }

        return this.testResources;
    } //-- java.util.List getTestResources()

    /**
     * Method removeFilter.
     * 
     * @param string
     */
    public void removeFilter( String string )
    {
        getFilters().remove( string );
    } //-- void removeFilter( String )

    /**
     * Method removeResource.
     * 
     * @param resource
     */
    public void removeResource( Resource resource )
    {
        getResources().remove( resource );
    } //-- void removeResource( Resource )

    /**
     * Method removeTestResource.
     * 
     * @param resource
     */
    public void removeTestResource( Resource resource )
    {
        getTestResources().remove( resource );
    } //-- void removeTestResource( Resource )

    /**
     * Set the default goal (or phase in Maven 2) to execute when
     * none is specified for
     *             the project. Note that in case of a multi-module
     * build, only the default goal of the top-level
     *             project is relevant, i.e. the default goals of
     * child modules are ignored. Since Maven 3,
     *             multiple goals/phases can be separated by
     * whitespace.
     * 
     * @param defaultGoal
     */
    public void setDefaultGoal( String defaultGoal )
    {
        this.defaultGoal = defaultGoal;
    } //-- void setDefaultGoal( String )

    /**
     * Set the directory where all files generated by the build are
     * placed.
     * 
     * @param directory
     */
    public void setDirectory( String directory )
    {
        this.directory = directory;
    } //-- void setDirectory( String )

    /**
     * Set the list of filter properties files that are used when
     * filtering is enabled.
     * 
     * @param filters
     */
    public void setFilters( java.util.List filters )
    {
        this.filters = filters;
    } //-- void setFilters( java.util.List )

    /**
     * Set the filename (excluding the extension, and with no path
     * information) that
     *             the produced artifact will be called.
     *             The default value is
     * ${artifactId}-${version}.
     * 
     * @param finalName
     */
    public void setFinalName( String finalName )
    {
        this.finalName = finalName;
    } //-- void setFinalName( String )

    /**
     * Set this element describes all of the classpath resources
     * such as properties
     *             files associated with a project. These resources
     * are often included in the final
     *             package.
     * 
     * @param resources
     */
    public void setResources( java.util.List resources )
    {
        this.resources = resources;
    } //-- void setResources( java.util.List )

    /**
     * Set this element describes all of the classpath resources
     * such as properties
     *             files associated with a project's unit tests.
     * 
     * @param testResources
     */
    public void setTestResources( java.util.List testResources )
    {
        this.testResources = testResources;
    } //-- void setTestResources( java.util.List )

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy