Package org.apache.maven.model
Class ModelBase
java.lang.Object
org.apache.maven.model.ModelBase
- All Implemented Interfaces:
Serializable
,Cloneable
,InputLocationTracker
Base class for the
Model
and the
Profile
objects.- Version:
- $Revision$ $Date$
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addDependency
(Dependency dependency) Method addDependency.void
Method addModule.void
addPluginRepository
(Repository repository) Method addPluginRepository.void
addProperty
(String key, String value) Method addProperty.void
addRepository
(Repository repository) Method addRepository.clone()
Method clone.Method getDependencies.Get default dependency information for projects that inherit from this one.Get distribution information for a project that enables deployment of the site and artifacts to remote web servers and repositories respectively.getLocation
(Object key) Gets the location of the specified field in the input source.Method getModules.Method getPluginRepositories.Method getProperties.Get this element includes the specification of report plugins to use to generate the reports on the Maven-generated site.Get Deprecated.Method getRepositories.void
removeDependency
(Dependency dependency) Method removeDependency.void
removeModule
(String string) Method removeModule.void
removePluginRepository
(Repository repository) Method removePluginRepository.void
removeRepository
(Repository repository) Method removeRepository.void
setDependencies
(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
(Object key, InputLocation location) Sets the location of the specified field.void
setModules
(List<String> modules) Set the modules (sometimes called subprojects) to build as a part of this project.void
setOtherLocation
(Object key, InputLocation location) void
setPluginRepositories
(List<Repository> pluginRepositories) Set the lists of the remote repositories for discovering plugins for builds and reports.void
setProperties
(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
(Object reports) Set Deprecated.void
setRepositories
(List<Repository> repositories) Set the lists of the remote repositories for discovering dependencies and extensions.
-
Constructor Details
-
ModelBase
public ModelBase()
-
-
Method Details
-
addDependency
Method addDependency.- Parameters:
dependency
- a dependency object.
-
addModule
Method addModule.- Parameters:
string
- a string object.
-
addPluginRepository
Method addPluginRepository.- Parameters:
repository
- a repository object.
-
addProperty
Method addProperty.- Parameters:
key
- a key object.value
- a value object.
-
addRepository
Method addRepository.- Parameters:
repository
- a repository object.
-
clone
Method clone. -
getDependencies
Method getDependencies.- Returns:
- List
-
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
Get distribution information for a project that enables deployment of the site and artifacts to remote web servers and repositories respectively.- Returns:
- DistributionManagement
-
getLocation
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
Method getModules.- Returns:
- List
-
setLocation
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
- Parameters:
key
- a key object.location
- a location object.
-
getPluginRepositories
Method getPluginRepositories.- Returns:
- List
-
getProperties
Method getProperties.- Returns:
- Properties
-
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
Get Deprecated. Now ignored by Maven.- Returns:
- Object
-
getRepositories
Method getRepositories.- Returns:
- List
-
removeDependency
Method removeDependency.- Parameters:
dependency
- a dependency object.
-
removeModule
Method removeModule.- Parameters:
string
- a string object.
-
removePluginRepository
Method removePluginRepository.- Parameters:
repository
- a repository object.
-
removeRepository
Method removeRepository.- Parameters:
repository
- a repository object.
-
setDependencies
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
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
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
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
Set the lists of the remote repositories for discovering plugins for builds and reports.- Parameters:
pluginRepositories
- a pluginRepositories object.
-
setProperties
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
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
Set Deprecated. Now ignored by Maven.- Parameters:
reports
- a reports object.
-
setRepositories
Set the lists of the remote repositories for discovering dependencies and extensions.- Parameters:
repositories
- a repositories object.
-