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
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder 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.BuilderCreates a newModelBasebuilder instance.static ModelBase.BuildernewBuilder(boolean withDefaults) Creates a newModelBasebuilder instance using default values or not.static ModelBase.BuildernewBuilder(ModelBase from) Creates a newModelBasebuilder instance using the specified object as a basis.static ModelBase.BuildernewBuilder(ModelBase from, boolean forceCopy) Creates a newModelBasebuilder instance using the specified object as a basis.static ModelBaseCreates a newModelBaseinstance.static ModelBasenewInstance(boolean withDefaults) Creates a newModelBaseinstance using default values or not.with()Creates a new builder with this object as the basis.withDependencies(Collection<Dependency> dependencies) Creates a newModelBaseinstance using the specified dependencies.withDependencyManagement(DependencyManagement dependencyManagement) Creates a newModelBaseinstance using the specified dependencyManagement.withDistributionManagement(DistributionManagement distributionManagement) Creates a newModelBaseinstance using the specified distributionManagement.withModules(Collection<String> modules) Creates a newModelBaseinstance using the specified modules.withPluginRepositories(Collection<Repository> pluginRepositories) Creates a newModelBaseinstance using the specified pluginRepositories.withProperties(Map<String, String> properties) Creates a newModelBaseinstance using the specified properties.withReporting(Reporting reporting) Creates a newModelBaseinstance using the specified reporting.withRepositories(Collection<Repository> repositories) Creates a newModelBaseinstance 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:
getLocationin interfaceInputLocationTracker
-
with
Creates a new builder with this object as the basis.- Returns:
- a
Builder
-
withModules
Creates a newModelBaseinstance using the specified modules.- Parameters:
modules- the newCollection<String>to use- Returns:
- a
ModelBasewith the specified modules
-
withDistributionManagement
Creates a newModelBaseinstance using the specified distributionManagement.- Parameters:
distributionManagement- the newDistributionManagementto use- Returns:
- a
ModelBasewith the specified distributionManagement
-
withProperties
Creates a newModelBaseinstance using the specified properties.- Parameters:
properties- the newMap<String, String>to use- Returns:
- a
ModelBasewith the specified properties
-
withDependencyManagement
Creates a newModelBaseinstance using the specified dependencyManagement.- Parameters:
dependencyManagement- the newDependencyManagementto use- Returns:
- a
ModelBasewith the specified dependencyManagement
-
withDependencies
Creates a newModelBaseinstance using the specified dependencies.- Parameters:
dependencies- the newCollection<Dependency>to use- Returns:
- a
ModelBasewith the specified dependencies
-
withRepositories
Creates a newModelBaseinstance using the specified repositories.- Parameters:
repositories- the newCollection<Repository>to use- Returns:
- a
ModelBasewith the specified repositories
-
withPluginRepositories
Creates a newModelBaseinstance using the specified pluginRepositories.- Parameters:
pluginRepositories- the newCollection<Repository>to use- Returns:
- a
ModelBasewith the specified pluginRepositories
-
withReporting
Creates a newModelBaseinstance using the specified reporting.- Parameters:
reporting- the newReportingto use- Returns:
- a
ModelBasewith the specified reporting
-
newInstance
Creates a newModelBaseinstance. Equivalent tonewInstance(true).- Returns:
- a new
ModelBase - See Also:
-
newInstance
Creates a newModelBaseinstance 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 newModelBasebuilder instance. Equivalent tonewBuilder(true).- Returns:
- a new
Builder - See Also:
-
newBuilder
Creates a newModelBasebuilder instance using default values or not.- Parameters:
withDefaults- the boolean indicating whether default values should be used- Returns:
- a new
Builder
-
newBuilder
Creates a newModelBasebuilder instance using the specified object as a basis. Equivalent tonewBuilder(from, false).- Parameters:
from- theModelBaseinstance to use as a basis- Returns:
- a new
Builder
-
newBuilder
Creates a newModelBasebuilder instance using the specified object as a basis.- Parameters:
from- theModelBaseinstance to use as a basisforceCopy- the boolean indicating if a copy should be forced- Returns:
- a new
Builder
-