Package org.apache.maven.model
Class ModelBase
- java.lang.Object
-
- org.apache.maven.model.ModelBase
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,InputLocationTracker
public class ModelBase extends java.lang.Object implements java.io.Serializable, java.lang.Cloneable, InputLocationTracker
Base class for theModel
and theProfile
objects.- Version:
- $Revision$ $Date$
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<Dependency>
dependencies
Field dependencies.private InputLocation
dependenciesLocation
Field dependenciesLocation.private DependencyManagement
dependencyManagement
Default dependency information for projects that inherit from this one.private InputLocation
dependencyManagementLocation
Field dependencyManagementLocation.private DistributionManagement
distributionManagement
Distribution information for a project that enables deployment of the site and artifacts to remote web servers and repositories respectively.private InputLocation
distributionManagementLocation
Field distributionManagementLocation.private InputLocation
location
Field location.private java.util.Map<java.lang.Object,InputLocation>
locations
Field locations.private java.util.List<java.lang.String>
modules
Field modules.private InputLocation
modulesLocation
Field modulesLocation.private java.util.List<Repository>
pluginRepositories
Field pluginRepositories.private InputLocation
pluginRepositoriesLocation
Field pluginRepositoriesLocation.private java.util.Properties
properties
Field properties.private InputLocation
propertiesLocation
Field propertiesLocation.private Reporting
reporting
This element includes the specification of report plugins to use to generate the reports on the Maven-generated site.private InputLocation
reportingLocation
Field reportingLocation.private java.lang.Object
reports
Deprecated.private InputLocation
reportsLocation
Field reportsLocation.private java.util.List<Repository>
repositories
Field repositories.private InputLocation
repositoriesLocation
Field repositoriesLocation.
-
Constructor Summary
Constructors Constructor Description ModelBase()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addDependency(Dependency dependency)
Method addDependency.void
addModule(java.lang.String string)
Method addModule.void
addPluginRepository(Repository repository)
Method addPluginRepository.void
addProperty(java.lang.String key, java.lang.String value)
Method addProperty.void
addRepository(Repository repository)
Method addRepository.ModelBase
clone()
Method clone.java.util.List<Dependency>
getDependencies()
Method getDependencies.DependencyManagement
getDependencyManagement()
Get default dependency information for projects that inherit from this one.DistributionManagement
getDistributionManagement()
Get distribution information for a project that enables deployment of the site and artifacts to remote web servers and repositories respectively.InputLocation
getLocation(java.lang.Object key)
Gets the location of the specified field in the input source.java.util.List<java.lang.String>
getModules()
Method getModules.private InputLocation
getOtherLocation(java.lang.Object key)
java.util.List<Repository>
getPluginRepositories()
Method getPluginRepositories.java.util.Properties
getProperties()
Method getProperties.Reporting
getReporting()
Get this element includes the specification of report plugins to use to generate the reports on the Maven-generated site.java.lang.Object
getReports()
Get Deprecated.java.util.List<Repository>
getRepositories()
Method getRepositories.void
removeDependency(Dependency dependency)
Method removeDependency.void
removeModule(java.lang.String string)
Method removeModule.void
removePluginRepository(Repository repository)
Method removePluginRepository.void
removeRepository(Repository repository)
Method removeRepository.void
setDependencies(java.util.List<Dependency> dependencies)
Set this element describes all of the dependencies associated with a project.void
setDependencyManagement(DependencyManagement dependencyManagement)
Set default dependency information for projects that inherit from this one.void
setDistributionManagement(DistributionManagement distributionManagement)
Set distribution information for a project that enables deployment of the site and artifacts to remote web servers and repositories respectively.void
setLocation(java.lang.Object key, InputLocation location)
Sets the location of the specified field.void
setModules(java.util.List<java.lang.String> modules)
Set the modules (sometimes called subprojects) to build as a part of this project.void
setOtherLocation(java.lang.Object key, InputLocation location)
void
setPluginRepositories(java.util.List<Repository> pluginRepositories)
Set the lists of the remote repositories for discovering plugins for builds and reports.void
setProperties(java.util.Properties properties)
Set properties that can be used throughout the POM as a substitution, and are used as filters in resources if enabled.void
setReporting(Reporting reporting)
Set this element includes the specification of report plugins to use to generate the reports on the Maven-generated site.void
setReports(java.lang.Object reports)
Set Deprecated.void
setRepositories(java.util.List<Repository> repositories)
Set the lists of the remote repositories for discovering dependencies and extensions.
-
-
-
Field Detail
-
modules
private java.util.List<java.lang.String> modules
Field modules.
-
distributionManagement
private DistributionManagement distributionManagement
Distribution information for a project that enables deployment of the site and artifacts to remote web servers and repositories respectively.
-
properties
private java.util.Properties properties
Field properties.
-
dependencyManagement
private DependencyManagement dependencyManagement
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.
-
dependencies
private java.util.List<Dependency> dependencies
Field dependencies.
-
repositories
private java.util.List<Repository> repositories
Field repositories.
-
pluginRepositories
private java.util.List<Repository> pluginRepositories
Field pluginRepositories.
-
reports
private java.lang.Object reports
Deprecated. Now ignored by Maven.
-
reporting
private Reporting reporting
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 executesmvn site
. All of the reports will be included in the navigation bar for browsing.
-
locations
private java.util.Map<java.lang.Object,InputLocation> locations
Field locations.
-
location
private InputLocation location
Field location.
-
modulesLocation
private InputLocation modulesLocation
Field modulesLocation.
-
distributionManagementLocation
private InputLocation distributionManagementLocation
Field distributionManagementLocation.
-
propertiesLocation
private InputLocation propertiesLocation
Field propertiesLocation.
-
dependencyManagementLocation
private InputLocation dependencyManagementLocation
Field dependencyManagementLocation.
-
dependenciesLocation
private InputLocation dependenciesLocation
Field dependenciesLocation.
-
repositoriesLocation
private InputLocation repositoriesLocation
Field repositoriesLocation.
-
pluginRepositoriesLocation
private InputLocation pluginRepositoriesLocation
Field pluginRepositoriesLocation.
-
reportsLocation
private InputLocation reportsLocation
Field reportsLocation.
-
reportingLocation
private InputLocation reportingLocation
Field reportingLocation.
-
-
Method Detail
-
addDependency
public void addDependency(Dependency dependency)
Method addDependency.- Parameters:
dependency
- a dependency object.
-
addModule
public void addModule(java.lang.String string)
Method addModule.- Parameters:
string
- a string object.
-
addPluginRepository
public void addPluginRepository(Repository repository)
Method addPluginRepository.- Parameters:
repository
- a repository object.
-
addProperty
public void addProperty(java.lang.String key, java.lang.String value)
Method addProperty.- Parameters:
key
- a key object.value
- a value object.
-
addRepository
public void addRepository(Repository repository)
Method addRepository.- Parameters:
repository
- a repository object.
-
clone
public ModelBase clone()
Method clone.- Overrides:
clone
in classjava.lang.Object
- Returns:
- ModelBase
-
getDependencies
public java.util.List<Dependency> getDependencies()
Method getDependencies.- Returns:
- List
-
getDependencyManagement
public DependencyManagement getDependencyManagement()
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.- Returns:
- DependencyManagement
-
getDistributionManagement
public DistributionManagement getDistributionManagement()
Get distribution information for a project that enables deployment of the site and artifacts to remote web servers and repositories respectively.- Returns:
- DistributionManagement
-
getLocation
public InputLocation getLocation(java.lang.Object key)
Description copied from interface:InputLocationTracker
Gets the location of the specified field in the input source.- Specified by:
getLocation
in interfaceInputLocationTracker
- Parameters:
key
- a key object.- Returns:
- InputLocation
-
getModules
public java.util.List<java.lang.String> getModules()
Method getModules.- Returns:
- List
-
setLocation
public void setLocation(java.lang.Object key, InputLocation location)
Description copied from interface:InputLocationTracker
Sets the location of the specified field.- Specified by:
setLocation
in interfaceInputLocationTracker
- Parameters:
key
- a key object.location
- a location object.
-
setOtherLocation
public void setOtherLocation(java.lang.Object key, InputLocation location)
- Parameters:
key
- a key object.location
- a location object.
-
getOtherLocation
private InputLocation getOtherLocation(java.lang.Object key)
- Parameters:
key
- a key object.- Returns:
- InputLocation
-
getPluginRepositories
public java.util.List<Repository> getPluginRepositories()
Method getPluginRepositories.- Returns:
- List
-
getProperties
public java.util.Properties getProperties()
Method getProperties.- Returns:
- Properties
-
getReporting
public Reporting getReporting()
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 executesmvn site
. All of the reports will be included in the navigation bar for browsing.- Returns:
- Reporting
-
getReports
public java.lang.Object getReports()
Get Deprecated. Now ignored by Maven.- Returns:
- Object
-
getRepositories
public java.util.List<Repository> getRepositories()
Method getRepositories.- Returns:
- List
-
removeDependency
public void removeDependency(Dependency dependency)
Method removeDependency.- Parameters:
dependency
- a dependency object.
-
removeModule
public void removeModule(java.lang.String string)
Method removeModule.- Parameters:
string
- a string object.
-
removePluginRepository
public void removePluginRepository(Repository repository)
Method removePluginRepository.- Parameters:
repository
- a repository object.
-
removeRepository
public void removeRepository(Repository repository)
Method removeRepository.- Parameters:
repository
- a repository object.
-
setDependencies
public void setDependencies(java.util.List<Dependency> dependencies)
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.- Parameters:
dependencies
- a dependencies object.
-
setDependencyManagement
public void setDependencyManagement(DependencyManagement dependencyManagement)
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.- Parameters:
dependencyManagement
- a dependencyManagement object.
-
setDistributionManagement
public void setDistributionManagement(DistributionManagement distributionManagement)
Set distribution information for a project that enables deployment of the site and artifacts to remote web servers and repositories respectively.- Parameters:
distributionManagement
- a distributionManagement object
-
setModules
public void setModules(java.util.List<java.lang.String> modules)
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. To be consistent with the way default urls are calculated from parent, it is recommended to have module names match artifact ids.- Parameters:
modules
- a modules object.
-
setPluginRepositories
public void setPluginRepositories(java.util.List<Repository> pluginRepositories)
Set the lists of the remote repositories for discovering plugins for builds and reports.- Parameters:
pluginRepositories
- a pluginRepositories object.
-
setProperties
public void setProperties(java.util.Properties properties)
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>
.- Parameters:
properties
- a properties object.
-
setReporting
public void setReporting(Reporting reporting)
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 executesmvn site
. All of the reports will be included in the navigation bar for browsing.- Parameters:
reporting
- a reporting object.
-
setReports
public void setReports(java.lang.Object reports)
Set Deprecated. Now ignored by Maven.- Parameters:
reports
- a reports object.
-
setRepositories
public void setRepositories(java.util.List<Repository> repositories)
Set the lists of the remote repositories for discovering dependencies and extensions.- Parameters:
repositories
- a repositories object.
-
-