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

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

The newest version!
// =================== DO NOT EDIT THIS FILE ====================
// Generated by Modello 1.7,
// any modifications will be overwritten.
// ==============================================================

package org.apache.maven.model;

/**
 * 
 *         
 *         Base class for the Model and the
 * Profile objects.
 *         
 *       
 * 
 * @version $Revision$ $Date$
 */
@SuppressWarnings( "all" )
public class ModelBase
    implements java.io.Serializable, java.lang.Cloneable, org.apache.maven.model.InputLocationTracker
{

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

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

    /**
     * Distribution information for a project that enables
     * deployment of the site
     *             and artifacts to remote web servers and
     * repositories respectively.
     */
    private DistributionManagement distributionManagement;

    /**
     * Field properties.
     */
    private java.util.Properties properties;

    /**
     * Default dependency information for projects that inherit
     * from this one. The
     *             dependencies in this section are not immediately
     * resolved. Instead, when a POM derived
     *             from this one declares a dependency described by
     * a matching groupId and artifactId, the
     *             version and other values from this section are
     * used for that dependency if they were not
     *             already specified.
     */
    private DependencyManagement dependencyManagement;

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

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

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

    /**
     * 
     *             
     *             Deprecated. Now ignored by Maven.
     *             
     *           
     */
    private Object reports;

    /**
     * 
     *             
     *             This element includes the specification of
     * report plugins to use
     *             to generate the reports on the Maven-generated
     * site.
     *             These reports will be run when a user executes
     * mvn site.
     *             All of the reports will be included in the
     * navigation bar for browsing.
     *             
     *           
     */
    private Reporting reporting;

    /**
     * Field locations.
     */
    private java.util.Map locations;


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

    /**
     * Method addDependency.
     * 
     * @param dependency
     */
    public void addDependency( Dependency dependency )
    {
        getDependencies().add( dependency );
    } //-- void addDependency( Dependency )

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

    /**
     * Method addPluginRepository.
     * 
     * @param repository
     */
    public void addPluginRepository( Repository repository )
    {
        getPluginRepositories().add( repository );
    } //-- void addPluginRepository( Repository )

    /**
     * Method addProperty.
     * 
     * @param key
     * @param value
     */
    public void addProperty( String key, String value )
    {
        getProperties().put( key, value );
    } //-- void addProperty( String, String )

    /**
     * Method addRepository.
     * 
     * @param repository
     */
    public void addRepository( Repository repository )
    {
        getRepositories().add( repository );
    } //-- void addRepository( Repository )

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

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

            if ( this.distributionManagement != null )
            {
                copy.distributionManagement = (DistributionManagement) this.distributionManagement.clone();
            }

            if ( this.properties != null )
            {
                copy.properties = (java.util.Properties) this.properties.clone();
            }

            if ( this.dependencyManagement != null )
            {
                copy.dependencyManagement = (DependencyManagement) this.dependencyManagement.clone();
            }

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

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

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

            if ( this.reports != null )
            {
                copy.reports = new org.codehaus.plexus.util.xml.Xpp3Dom( (org.codehaus.plexus.util.xml.Xpp3Dom) this.reports );
            }

            if ( this.reporting != null )
            {
                copy.reporting = (Reporting) this.reporting.clone();
            }

            if ( copy.locations != null )
            {
                copy.locations = new java.util.LinkedHashMap( copy.locations );
            }

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

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

        return this.dependencies;
    } //-- java.util.List getDependencies()

    /**
     * Get default dependency information for projects that inherit
     * from this one. The
     *             dependencies in this section are not immediately
     * resolved. Instead, when a POM derived
     *             from this one declares a dependency described by
     * a matching groupId and artifactId, the
     *             version and other values from this section are
     * used for that dependency if they were not
     *             already specified.
     * 
     * @return DependencyManagement
     */
    public DependencyManagement getDependencyManagement()
    {
        return this.dependencyManagement;
    } //-- DependencyManagement getDependencyManagement()

    /**
     * Get distribution information for a project that enables
     * deployment of the site
     *             and artifacts to remote web servers and
     * repositories respectively.
     * 
     * @return DistributionManagement
     */
    public DistributionManagement getDistributionManagement()
    {
        return this.distributionManagement;
    } //-- DistributionManagement getDistributionManagement()

    /**
     * 
     * 
     * @param key
     * @return InputLocation
     */
    public InputLocation getLocation( Object key )
    {
        return ( locations != null ) ? locations.get( key ) : null;
    } //-- InputLocation getLocation( Object )

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

        return this.modules;
    } //-- java.util.List getModules()

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

        return this.pluginRepositories;
    } //-- java.util.List getPluginRepositories()

    /**
     * Method getProperties.
     * 
     * @return Properties
     */
    public java.util.Properties getProperties()
    {
        if ( this.properties == null )
        {
            this.properties = new java.util.Properties();
        }

        return this.properties;
    } //-- java.util.Properties getProperties()

    /**
     * Get this element includes the specification of report
     * plugins to use
     *             to generate the reports on the Maven-generated
     * site.
     *             These reports will be run when a user executes
     * mvn site.
     *             All of the reports will be included in the
     * navigation bar for browsing.
     * 
     * @return Reporting
     */
    public Reporting getReporting()
    {
        return this.reporting;
    } //-- Reporting getReporting()

    /**
     * Get Deprecated. Now ignored by Maven.
     * 
     * @return Object
     */
    public Object getReports()
    {
        return this.reports;
    } //-- Object getReports()

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

        return this.repositories;
    } //-- java.util.List getRepositories()

    /**
     * Method removeDependency.
     * 
     * @param dependency
     */
    public void removeDependency( Dependency dependency )
    {
        getDependencies().remove( dependency );
    } //-- void removeDependency( Dependency )

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

    /**
     * Method removePluginRepository.
     * 
     * @param repository
     */
    public void removePluginRepository( Repository repository )
    {
        getPluginRepositories().remove( repository );
    } //-- void removePluginRepository( Repository )

    /**
     * Method removeRepository.
     * 
     * @param repository
     */
    public void removeRepository( Repository repository )
    {
        getRepositories().remove( repository );
    } //-- void removeRepository( Repository )

    /**
     * Set this element describes all of the dependencies
     * associated with a
     *             project.
     *             These dependencies are used to construct a
     * classpath for your
     *             project during the build process. They are
     * automatically downloaded from the
     *             repositories defined in this project.
     *             See the
     *             dependency mechanism for more information.
     * 
     * @param dependencies
     */
    public void setDependencies( java.util.List dependencies )
    {
        this.dependencies = dependencies;
    } //-- void setDependencies( java.util.List )

    /**
     * Set default dependency information for projects that inherit
     * from this one. The
     *             dependencies in this section are not immediately
     * resolved. Instead, when a POM derived
     *             from this one declares a dependency described by
     * a matching groupId and artifactId, the
     *             version and other values from this section are
     * used for that dependency if they were not
     *             already specified.
     * 
     * @param dependencyManagement
     */
    public void setDependencyManagement( DependencyManagement dependencyManagement )
    {
        this.dependencyManagement = dependencyManagement;
    } //-- void setDependencyManagement( DependencyManagement )

    /**
     * Set distribution information for a project that enables
     * deployment of the site
     *             and artifacts to remote web servers and
     * repositories respectively.
     * 
     * @param distributionManagement
     */
    public void setDistributionManagement( DistributionManagement distributionManagement )
    {
        this.distributionManagement = distributionManagement;
    } //-- void setDistributionManagement( DistributionManagement )

    /**
     * 
     * 
     * @param key
     * @param location
     */
    public void setLocation( Object key, InputLocation location )
    {
        if ( location != null )
        {
            if ( this.locations == null )
            {
                this.locations = new java.util.LinkedHashMap();
            }
            this.locations.put( key, location );
        }
    } //-- void setLocation( Object, InputLocation )

    /**
     * Set the modules (sometimes called subprojects) to build as a
     * part of this
     *             project. Each module listed is a relative path
     * to the directory containing the module.
     * 
     * @param modules
     */
    public void setModules( java.util.List modules )
    {
        this.modules = modules;
    } //-- void setModules( java.util.List )

    /**
     * Set the lists of the remote repositories for discovering
     * plugins for builds and
     *             reports.
     * 
     * @param pluginRepositories
     */
    public void setPluginRepositories( java.util.List pluginRepositories )
    {
        this.pluginRepositories = pluginRepositories;
    } //-- void setPluginRepositories( java.util.List )

    /**
     * Set properties that can be used throughout the POM as a
     * substitution, and
     *             are used as filters in resources if enabled.
     *             The format is
     * <name>value</name>.
     * 
     * @param properties
     */
    public void setProperties( java.util.Properties properties )
    {
        this.properties = properties;
    } //-- void setProperties( java.util.Properties )

    /**
     * Set this element includes the specification of report
     * plugins to use
     *             to generate the reports on the Maven-generated
     * site.
     *             These reports will be run when a user executes
     * mvn site.
     *             All of the reports will be included in the
     * navigation bar for browsing.
     * 
     * @param reporting
     */
    public void setReporting( Reporting reporting )
    {
        this.reporting = reporting;
    } //-- void setReporting( Reporting )

    /**
     * Set Deprecated. Now ignored by Maven.
     * 
     * @param reports
     */
    public void setReports( Object reports )
    {
        this.reports = reports;
    } //-- void setReports( Object )

    /**
     * Set the lists of the remote repositories for discovering
     * dependencies and
     *             extensions.
     * 
     * @param repositories
     */
    public void setRepositories( java.util.List repositories )
    {
        this.repositories = repositories;
    } //-- void setRepositories( java.util.List )

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy