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 SummaryNested ClassesModifier and TypeClassDescriptionstatic classBuilder class used to create ModelBase instances.
- 
Method SummaryModifier 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- 
getModulesThe 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>
 
- 
getDistributionManagementDistribution information for a project that enables deployment of the site and artifacts to remote web servers and repositories respectively.- Returns:
- a DistributionManagement
 
- 
getPropertiesProperties 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>
 
- 
getDependencyManagementDefault 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
 
- 
getDependenciesThis 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>
 
- 
getRepositoriesThe lists of the remote repositories for discovering dependencies and extensions.- Returns:
- a List<Repository>
 
- 
getPluginRepositoriesThe lists of the remote repositories for discovering plugins for builds and reports.- Returns:
- a List<Repository>
 
- 
getReportingThis 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
 
- 
getLocationGets the location of the specified field in the input source.- Specified by:
- getLocationin interface- InputLocationTracker
 
- 
withCreates a new builder with this object as the basis.- Returns:
- a Builder
 
- 
withModulesCreates a newModelBaseinstance using the specified modules.- Parameters:
- modules- the new- Collection<String>to use
- Returns:
- a ModelBasewith the specified modules
 
- 
withDistributionManagementCreates a newModelBaseinstance using the specified distributionManagement.- Parameters:
- distributionManagement- the new- DistributionManagementto use
- Returns:
- a ModelBasewith the specified distributionManagement
 
- 
withPropertiesCreates a newModelBaseinstance using the specified properties.- Parameters:
- properties- the new- Map<String, String>to use
- Returns:
- a ModelBasewith the specified properties
 
- 
withDependencyManagementCreates a newModelBaseinstance using the specified dependencyManagement.- Parameters:
- dependencyManagement- the new- DependencyManagementto use
- Returns:
- a ModelBasewith the specified dependencyManagement
 
- 
withDependenciesCreates a newModelBaseinstance using the specified dependencies.- Parameters:
- dependencies- the new- Collection<Dependency>to use
- Returns:
- a ModelBasewith the specified dependencies
 
- 
withRepositoriesCreates a newModelBaseinstance using the specified repositories.- Parameters:
- repositories- the new- Collection<Repository>to use
- Returns:
- a ModelBasewith the specified repositories
 
- 
withPluginRepositoriesCreates a newModelBaseinstance using the specified pluginRepositories.- Parameters:
- pluginRepositories- the new- Collection<Repository>to use
- Returns:
- a ModelBasewith the specified pluginRepositories
 
- 
withReportingCreates a newModelBaseinstance using the specified reporting.- Parameters:
- reporting- the new- Reportingto use
- Returns:
- a ModelBasewith the specified reporting
 
- 
newInstanceCreates a newModelBaseinstance. Equivalent tonewInstance( true ).- Returns:
- a new ModelBase
- See Also:
 
- 
newInstanceCreates 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
 
- 
newBuilderCreates a newModelBasebuilder instance. Equivalent tonewBuilder( true ).- Returns:
- a new Builder
- See Also:
 
- 
newBuilderCreates a newModelBasebuilder instance using default values or not.- Parameters:
- withDefaults- the boolean indicating whether default values should be used
- Returns:
- a new Builder
 
- 
newBuilderCreates a newModelBasebuilder instance using the specified object as a basis. Equivalent tonewBuilder( from, false ).- Parameters:
- from- the- ModelBaseinstance to use as a basis
- Returns:
- a new Builder
 
- 
newBuilderCreates a newModelBasebuilder instance using the specified object as a basis.- Parameters:
- from- the- ModelBaseinstance to use as a basis
- forceCopy- the boolean indicating if a copy should be forced
- Returns:
- a new Builder
 
 
-