Package org.apache.maven.api.model
Class ModelBase
java.lang.Object
org.apache.maven.api.model.ModelBase
- All Implemented Interfaces:
Serializable
,InputLocationTracker
@Experimental
@Generated
@ThreadSafe
@Immutable
public class ModelBase
extends Object
implements Serializable, InputLocationTracker
Base class for the
Model
and the Profile
objects.- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Builder class used to create ModelBase instances. -
Method Summary
Modifier and TypeMethodDescriptionThis element describes all of the dependencies associated with a project.Default dependency information for projects that inherit from this one.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.The modules (sometimes called subprojects) to build as a part of this project.The lists of the remote repositories for discovering plugins for builds and reports.Properties that can be used throughout the POM as a substitution, and are used as filters in resources if enabled.This element includes the specification of report plugins to use to generate the reports on the Maven-generated site.The lists of the remote repositories for discovering dependencies and extensions.static ModelBase.Builder
Creates a newModelBase
builder instance.static ModelBase.Builder
newBuilder
(boolean withDefaults) Creates a newModelBase
builder instance using default values or not.static ModelBase.Builder
newBuilder
(ModelBase from) Creates a newModelBase
builder instance using the specified object as a basis.static ModelBase.Builder
newBuilder
(ModelBase from, boolean forceCopy) Creates a newModelBase
builder instance using the specified object as a basis.static ModelBase
Creates a newModelBase
instance.static ModelBase
newInstance
(boolean withDefaults) Creates a newModelBase
instance using default values or not.with()
Creates a new builder with this object as the basis.withDependencies
(Collection<Dependency> dependencies) Creates a newModelBase
instance using the specified dependencies.withDependencyManagement
(DependencyManagement dependencyManagement) Creates a newModelBase
instance using the specified dependencyManagement.withDistributionManagement
(DistributionManagement distributionManagement) Creates a newModelBase
instance using the specified distributionManagement.withModules
(Collection<String> modules) Creates a newModelBase
instance using the specified modules.withPluginRepositories
(Collection<Repository> pluginRepositories) Creates a newModelBase
instance using the specified pluginRepositories.withProperties
(Map<String, String> properties) Creates a newModelBase
instance using the specified properties.withReporting
(Reporting reporting) Creates a newModelBase
instance using the specified reporting.withRepositories
(Collection<Repository> repositories) Creates a newModelBase
instance using the specified repositories.
-
Method Details
-
getModules
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.- Returns:
- a
List<String>
-
getDistributionManagement
Distribution information for a project that enables deployment of the site and artifacts to remote web servers and repositories respectively.- Returns:
- a
DistributionManagement
-
getProperties
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>
.- Returns:
- a
Map<String, String>
-
getDependencyManagement
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:
- a
DependencyManagement
-
getDependencies
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.- Returns:
- a
List<Dependency>
-
getRepositories
The lists of the remote repositories for discovering dependencies and extensions.- Returns:
- a
List<Repository>
-
getPluginRepositories
The lists of the remote repositories for discovering plugins for builds and reports.- Returns:
- a
List<Repository>
-
getReporting
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:
- a
Reporting
-
getLocation
Gets the location of the specified field in the input source.- Specified by:
getLocation
in interfaceInputLocationTracker
-
with
Creates a new builder with this object as the basis.- Returns:
- a
Builder
-
withModules
Creates a newModelBase
instance using the specified modules.- Parameters:
modules
- the newCollection<String>
to use- Returns:
- a
ModelBase
with the specified modules
-
withDistributionManagement
Creates a newModelBase
instance using the specified distributionManagement.- Parameters:
distributionManagement
- the newDistributionManagement
to use- Returns:
- a
ModelBase
with the specified distributionManagement
-
withProperties
Creates a newModelBase
instance using the specified properties.- Parameters:
properties
- the newMap<String, String>
to use- Returns:
- a
ModelBase
with the specified properties
-
withDependencyManagement
Creates a newModelBase
instance using the specified dependencyManagement.- Parameters:
dependencyManagement
- the newDependencyManagement
to use- Returns:
- a
ModelBase
with the specified dependencyManagement
-
withDependencies
Creates a newModelBase
instance using the specified dependencies.- Parameters:
dependencies
- the newCollection<Dependency>
to use- Returns:
- a
ModelBase
with the specified dependencies
-
withRepositories
Creates a newModelBase
instance using the specified repositories.- Parameters:
repositories
- the newCollection<Repository>
to use- Returns:
- a
ModelBase
with the specified repositories
-
withPluginRepositories
Creates a newModelBase
instance using the specified pluginRepositories.- Parameters:
pluginRepositories
- the newCollection<Repository>
to use- Returns:
- a
ModelBase
with the specified pluginRepositories
-
withReporting
Creates a newModelBase
instance using the specified reporting.- Parameters:
reporting
- the newReporting
to use- Returns:
- a
ModelBase
with the specified reporting
-
newInstance
Creates a newModelBase
instance. Equivalent tonewInstance(true)
.- Returns:
- a new
ModelBase
- See Also:
-
newInstance
Creates a newModelBase
instance using default values or not. Equivalent tonewBuilder(withDefaults).build()
.- Parameters:
withDefaults
- the boolean indicating whether default values should be used- Returns:
- a new
ModelBase
-
newBuilder
Creates a newModelBase
builder instance. Equivalent tonewBuilder(true)
.- Returns:
- a new
Builder
- See Also:
-
newBuilder
Creates a newModelBase
builder instance using default values or not.- Parameters:
withDefaults
- the boolean indicating whether default values should be used- Returns:
- a new
Builder
-
newBuilder
Creates a newModelBase
builder instance using the specified object as a basis. Equivalent tonewBuilder(from, false)
.- Parameters:
from
- theModelBase
instance to use as a basis- Returns:
- a new
Builder
-
newBuilder
Creates a newModelBase
builder instance using the specified object as a basis.- Parameters:
from
- theModelBase
instance to use as a basisforceCopy
- the boolean indicating if a copy should be forced- Returns:
- a new
Builder
-