Class MavenModelMerger
java.lang.Object
org.apache.maven.model.v4.MavenMerger
org.apache.maven.internal.impl.model.MavenModelMerger
- Direct Known Subclasses:
DefaultDependencyManagementInjector.ManagementModelMerger
,DefaultInheritanceAssembler.InheritanceModelMerger
,DefaultLifecycleBindingsInjector.LifecycleBindingsMerger
,DefaultModelNormalizer.DuplicateMerger
,DefaultPluginManagementInjector.ManagementModelMerger
,DefaultProfileInjector.ProfileModelMerger
The domain-specific model merger for the Maven POM, overriding generic code from parent class when necessary with
more adapted algorithms.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.maven.model.v4.MavenMerger
MavenMerger.KeyComputer<T>
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
extrapolateChildUrl
(String parentUrl, boolean appendPath, Map<Object, Object> context) protected MavenMerger.KeyComputer
<Dependency> protected MavenMerger.KeyComputer
<Exclusion> protected MavenMerger.KeyComputer
<Extension> protected MavenMerger.KeyComputer
<PluginExecution> protected MavenMerger.KeyComputer
<Plugin> protected MavenMerger.KeyComputer
<ReportPlugin> protected MavenMerger.KeyComputer
<ReportSet> protected MavenMerger.KeyComputer
<RepositoryBase> protected boolean
isSiteEmpty
(Site site) Merges the specified source object into the given target object.protected void
mergeBuildBase_Filters
(BuildBase.Builder builder, BuildBase target, BuildBase source, boolean sourceDominant, Map<Object, Object> context) protected void
mergeBuildBase_Resources
(BuildBase.Builder builder, BuildBase target, BuildBase source, boolean sourceDominant, Map<Object, Object> context) protected void
mergeBuildBase_TestResources
(BuildBase.Builder builder, BuildBase target, BuildBase source, boolean sourceDominant, Map<Object, Object> context) protected void
mergeDistributionManagement_Relocation
(DistributionManagement.Builder builder, DistributionManagement target, DistributionManagement source, boolean sourceDominant, Map<Object, Object> context) protected void
mergeDistributionManagement_Repository
(DistributionManagement.Builder builder, DistributionManagement target, DistributionManagement source, boolean sourceDominant, Map<Object, Object> context) protected void
mergeDistributionManagement_Site
(DistributionManagement.Builder builder, DistributionManagement target, DistributionManagement source, boolean sourceDominant, Map<Object, Object> context) protected void
mergeDistributionManagement_SnapshotRepository
(DistributionManagement.Builder builder, DistributionManagement target, DistributionManagement source, boolean sourceDominant, Map<Object, Object> context) protected Model
protected void
mergeModel_ArtifactId
(Model.Builder builder, Model target, Model source, boolean sourceDominant, Map<Object, Object> context) protected void
mergeModel_CiManagement
(Model.Builder builder, Model target, Model source, boolean sourceDominant, Map<Object, Object> context) protected void
mergeModel_Contributors
(Model.Builder builder, Model target, Model source, boolean sourceDominant, Map<Object, Object> context) protected void
mergeModel_Developers
(Model.Builder builder, Model target, Model source, boolean sourceDominant, Map<Object, Object> context) protected void
mergeModel_IssueManagement
(Model.Builder builder, Model target, Model source, boolean sourceDominant, Map<Object, Object> context) protected void
mergeModel_Licenses
(Model.Builder builder, Model target, Model source, boolean sourceDominant, Map<Object, Object> context) protected void
mergeModel_MailingLists
(Model.Builder builder, Model target, Model source, boolean sourceDominant, Map<Object, Object> context) protected void
mergeModel_ModelVersion
(Model.Builder builder, Model target, Model source, boolean sourceDominant, Map<Object, Object> context) protected void
mergeModel_Name
(Model.Builder builder, Model target, Model source, boolean sourceDominant, Map<Object, Object> context) protected void
mergeModel_Organization
(Model.Builder builder, Model target, Model source, boolean sourceDominant, Map<Object, Object> context) protected void
mergeModel_Prerequisites
(Model.Builder builder, Model target, Model source, boolean sourceDominant, Map<Object, Object> context) protected void
mergeModel_Profiles
(Model.Builder builder, Model target, Model source, boolean sourceDominant, Map<Object, Object> context) protected void
mergeModel_Url
(Model.Builder builder, Model target, Model source, boolean sourceDominant, Map<Object, Object> context) protected void
mergeModelBase_Modules
(ModelBase.Builder builder, ModelBase target, ModelBase source, boolean sourceDominant, Map<Object, Object> context) protected void
mergeModelBase_PluginRepositories
(ModelBase.Builder builder, ModelBase target, ModelBase source, boolean sourceDominant, Map<Object, Object> context) protected void
mergeModelBase_Repositories
(ModelBase.Builder builder, ModelBase target, ModelBase source, boolean sourceDominant, Map<Object, Object> context) protected void
mergePlugin_Executions
(Plugin.Builder builder, Plugin target, Plugin source, boolean sourceDominant, Map<Object, Object> context) protected void
mergePluginExecution_Goals
(PluginExecution.Builder builder, PluginExecution target, PluginExecution source, boolean sourceDominant, Map<Object, Object> context) protected void
mergeReportPlugin_ReportSets
(ReportPlugin.Builder builder, ReportPlugin target, ReportPlugin source, boolean sourceDominant, Map<Object, Object> context) protected void
mergeScm_Connection
(Scm.Builder builder, Scm target, Scm source, boolean sourceDominant, Map<Object, Object> context) protected void
mergeScm_DeveloperConnection
(Scm.Builder builder, Scm target, Scm source, boolean sourceDominant, Map<Object, Object> context) protected void
mergeScm_Url
(Scm.Builder builder, Scm target, Scm source, boolean sourceDominant, Map<Object, Object> context) protected void
mergeSite_ChildSiteUrlInheritAppendPath
(Site.Builder builder, Site target, Site source, boolean sourceDominant, Map<Object, Object> context) protected void
mergeSite_Url
(Site.Builder builder, Site target, Site source, boolean sourceDominant, Map<Object, Object> context) Methods inherited from class org.apache.maven.model.v4.MavenMerger
getActivationFileKey, getActivationKey, getActivationOSKey, getActivationPropertyKey, getBuildBaseKey, getBuildKey, getCiManagementKey, getConfigurationContainerKey, getContributorKey, getDependencyManagementKey, getDeploymentRepositoryKey, getDeveloperKey, getDistributionManagementKey, getFileSetKey, getIssueManagementKey, getLicenseKey, getMailingListKey, getModelBaseKey, getModelKey, getNotifierKey, getOrganizationKey, getParentKey, getPatternSetKey, getPluginConfigurationKey, getPluginContainerKey, getPluginManagementKey, getPrerequisitesKey, getProfileKey, getRelocationKey, getReportingKey, getRepositoryKey, getRepositoryPolicyKey, getResourceKey, getScmKey, getSiteKey, merge, merge, mergeActivation, mergeActivation, mergeActivation_ActiveByDefault, mergeActivation_File, mergeActivation_Jdk, mergeActivation_Os, mergeActivation_Packaging, mergeActivation_Property, mergeActivationFile, mergeActivationFile, mergeActivationFile_Exists, mergeActivationFile_Missing, mergeActivationOS, mergeActivationOS, mergeActivationOS_Arch, mergeActivationOS_Family, mergeActivationOS_Name, mergeActivationOS_Version, mergeActivationProperty, mergeActivationProperty, mergeActivationProperty_Name, mergeActivationProperty_Value, mergeBuild, mergeBuild, mergeBuild_DefaultGoal, mergeBuild_Directory, mergeBuild_Extensions, mergeBuild_Filters, mergeBuild_FinalName, mergeBuild_OutputDirectory, mergeBuild_PluginManagement, mergeBuild_Plugins, mergeBuild_Resources, mergeBuild_ScriptSourceDirectory, mergeBuild_SourceDirectory, mergeBuild_TestOutputDirectory, mergeBuild_TestResources, mergeBuild_TestSourceDirectory, mergeBuildBase, mergeBuildBase, mergeBuildBase_DefaultGoal, mergeBuildBase_Directory, mergeBuildBase_FinalName, mergeBuildBase_PluginManagement, mergeBuildBase_Plugins, mergeCiManagement, mergeCiManagement, mergeCiManagement_Notifiers, mergeCiManagement_System, mergeCiManagement_Url, mergeConfigurationContainer, mergeConfigurationContainer, mergeConfigurationContainer_Configuration, mergeConfigurationContainer_Inherited, mergeContributor, mergeContributor, mergeContributor_Email, mergeContributor_Name, mergeContributor_Organization, mergeContributor_OrganizationUrl, mergeContributor_Properties, mergeContributor_Roles, mergeContributor_Timezone, mergeContributor_Url, mergeDependency, mergeDependency, mergeDependency_ArtifactId, mergeDependency_Classifier, mergeDependency_Exclusions, mergeDependency_GroupId, mergeDependency_Optional, mergeDependency_Scope, mergeDependency_SystemPath, mergeDependency_Type, mergeDependency_Version, mergeDependencyManagement, mergeDependencyManagement, mergeDependencyManagement_Dependencies, mergeDeploymentRepository, mergeDeploymentRepository, mergeDeploymentRepository_Id, mergeDeploymentRepository_Layout, mergeDeploymentRepository_Name, mergeDeploymentRepository_Releases, mergeDeploymentRepository_Snapshots, mergeDeploymentRepository_UniqueVersion, mergeDeploymentRepository_Url, mergeDeveloper, mergeDeveloper, mergeDeveloper_Email, mergeDeveloper_Id, mergeDeveloper_Name, mergeDeveloper_Organization, mergeDeveloper_OrganizationUrl, mergeDeveloper_Properties, mergeDeveloper_Roles, mergeDeveloper_Timezone, mergeDeveloper_Url, mergeDistributionManagement, mergeDistributionManagement, mergeDistributionManagement_DownloadUrl, mergeDistributionManagement_Status, mergeExclusion, mergeExclusion, mergeExclusion_ArtifactId, mergeExclusion_GroupId, mergeExtension, mergeExtension, mergeExtension_ArtifactId, mergeExtension_Configuration, mergeExtension_GroupId, mergeExtension_Version, mergeFileSet, mergeFileSet, mergeFileSet_Directory, mergeFileSet_Excludes, mergeFileSet_Includes, mergeIssueManagement, mergeIssueManagement, mergeIssueManagement_System, mergeIssueManagement_Url, mergeLicense, mergeLicense, mergeLicense_Comments, mergeLicense_Distribution, mergeLicense_Name, mergeLicense_Url, mergeMailingList, mergeMailingList, mergeMailingList_Archive, mergeMailingList_Name, mergeMailingList_OtherArchives, mergeMailingList_Post, mergeMailingList_Subscribe, mergeMailingList_Unsubscribe, mergeModel, mergeModel_Build, mergeModel_ChildProjectUrlInheritAppendPath, mergeModel_Dependencies, mergeModel_DependencyManagement, mergeModel_Description, mergeModel_DistributionManagement, mergeModel_GroupId, mergeModel_InceptionYear, mergeModel_Modules, mergeModel_Packaging, mergeModel_Parent, mergeModel_PluginRepositories, mergeModel_PomFile, mergeModel_PreserveModelVersion, mergeModel_Properties, mergeModel_Reporting, mergeModel_Repositories, mergeModel_Root, mergeModel_Scm, mergeModel_Version, mergeModelBase, mergeModelBase, mergeModelBase_Dependencies, mergeModelBase_DependencyManagement, mergeModelBase_DistributionManagement, mergeModelBase_Properties, mergeModelBase_Reporting, mergeNotifier, mergeNotifier, mergeNotifier_Address, mergeNotifier_Configuration, mergeNotifier_SendOnError, mergeNotifier_SendOnFailure, mergeNotifier_SendOnSuccess, mergeNotifier_SendOnWarning, mergeNotifier_Type, mergeOrganization, mergeOrganization, mergeOrganization_Name, mergeOrganization_Url, mergeParent, mergeParent, mergeParent_ArtifactId, mergeParent_GroupId, mergeParent_RelativePath, mergeParent_Version, mergePatternSet, mergePatternSet, mergePatternSet_Excludes, mergePatternSet_Includes, mergePlugin, mergePlugin, mergePlugin_ArtifactId, mergePlugin_Configuration, mergePlugin_Dependencies, mergePlugin_Extensions, mergePlugin_GroupId, mergePlugin_Inherited, mergePlugin_Version, mergePluginConfiguration, mergePluginConfiguration, mergePluginConfiguration_PluginManagement, mergePluginConfiguration_Plugins, mergePluginContainer, mergePluginContainer, mergePluginContainer_Plugins, mergePluginExecution, mergePluginExecution, mergePluginExecution_Configuration, mergePluginExecution_Id, mergePluginExecution_Inherited, mergePluginExecution_Phase, mergePluginExecution_Priority, mergePluginManagement, mergePluginManagement, mergePluginManagement_Plugins, mergePrerequisites, mergePrerequisites, mergePrerequisites_Maven, mergeProfile, mergeProfile, mergeProfile_Activation, mergeProfile_Build, mergeProfile_Dependencies, mergeProfile_DependencyManagement, mergeProfile_DistributionManagement, mergeProfile_Id, mergeProfile_Modules, mergeProfile_PluginRepositories, mergeProfile_Properties, mergeProfile_Reporting, mergeProfile_Repositories, mergeRelocation, mergeRelocation, mergeRelocation_ArtifactId, mergeRelocation_GroupId, mergeRelocation_Message, mergeRelocation_Version, mergeReporting, mergeReporting, mergeReporting_ExcludeDefaults, mergeReporting_OutputDirectory, mergeReporting_Plugins, mergeReportPlugin, mergeReportPlugin, mergeReportPlugin_ArtifactId, mergeReportPlugin_Configuration, mergeReportPlugin_GroupId, mergeReportPlugin_Inherited, mergeReportPlugin_Version, mergeReportSet, mergeReportSet, mergeReportSet_Configuration, mergeReportSet_Id, mergeReportSet_Inherited, mergeReportSet_Reports, mergeRepository, mergeRepository, mergeRepository_Id, mergeRepository_Layout, mergeRepository_Name, mergeRepository_Releases, mergeRepository_Snapshots, mergeRepository_Url, mergeRepositoryBase, mergeRepositoryBase, mergeRepositoryBase_Id, mergeRepositoryBase_Layout, mergeRepositoryBase_Name, mergeRepositoryBase_Url, mergeRepositoryPolicy, mergeRepositoryPolicy, mergeRepositoryPolicy_ChecksumPolicy, mergeRepositoryPolicy_Enabled, mergeRepositoryPolicy_UpdatePolicy, mergeResource, mergeResource, mergeResource_Directory, mergeResource_Excludes, mergeResource_Filtering, mergeResource_Includes, mergeResource_MergeId, mergeResource_TargetPath, mergeScm, mergeScm, mergeScm_ChildScmConnectionInheritAppendPath, mergeScm_ChildScmDeveloperConnectionInheritAppendPath, mergeScm_ChildScmUrlInheritAppendPath, mergeScm_Tag, mergeSite, mergeSite, mergeSite_Id, mergeSite_Name
-
Field Details
-
CHILD_PATH_ADJUSTMENT
The hint key for the child path adjustment used during inheritance for URL calculations.- See Also:
-
ARTIFACT_ID
The context key for the artifact id of the target model.- See Also:
-
-
Constructor Details
-
MavenModelMerger
public MavenModelMerger()
-
-
Method Details
-
merge
Description copied from class:MavenMerger
Merges the specified source object into the given target object.- Overrides:
merge
in classMavenMerger
- Parameters:
target
- The target object whose existing contents should be merged with the source, must not benull
.source
- The (read-only) source object that should be merged into the target object, may benull
.sourceDominant
- A flag indicating whether either the target object or the source object provides the dominant data.hints
- A set of key-value pairs that customized merger implementations can use to carry domain-specific information along, may benull
.
-
mergeModel
protected Model mergeModel(Model target, Model source, boolean sourceDominant, Map<Object, Object> context) - Overrides:
mergeModel
in classMavenMerger
-
mergeModel_Name
protected void mergeModel_Name(Model.Builder builder, Model target, Model source, boolean sourceDominant, Map<Object, Object> context) - Overrides:
mergeModel_Name
in classMavenMerger
-
mergeModel_Url
protected void mergeModel_Url(Model.Builder builder, Model target, Model source, boolean sourceDominant, Map<Object, Object> context) - Overrides:
mergeModel_Url
in classMavenMerger
-
mergeModel_Organization
protected void mergeModel_Organization(Model.Builder builder, Model target, Model source, boolean sourceDominant, Map<Object, Object> context) - Overrides:
mergeModel_Organization
in classMavenMerger
-
mergeModel_IssueManagement
protected void mergeModel_IssueManagement(Model.Builder builder, Model target, Model source, boolean sourceDominant, Map<Object, Object> context) - Overrides:
mergeModel_IssueManagement
in classMavenMerger
-
mergeModel_CiManagement
protected void mergeModel_CiManagement(Model.Builder builder, Model target, Model source, boolean sourceDominant, Map<Object, Object> context) - Overrides:
mergeModel_CiManagement
in classMavenMerger
-
mergeModel_ModelVersion
protected void mergeModel_ModelVersion(Model.Builder builder, Model target, Model source, boolean sourceDominant, Map<Object, Object> context) - Overrides:
mergeModel_ModelVersion
in classMavenMerger
-
mergeModel_ArtifactId
protected void mergeModel_ArtifactId(Model.Builder builder, Model target, Model source, boolean sourceDominant, Map<Object, Object> context) - Overrides:
mergeModel_ArtifactId
in classMavenMerger
-
mergeModel_Profiles
protected void mergeModel_Profiles(Model.Builder builder, Model target, Model source, boolean sourceDominant, Map<Object, Object> context) - Overrides:
mergeModel_Profiles
in classMavenMerger
-
mergeModel_Prerequisites
protected void mergeModel_Prerequisites(Model.Builder builder, Model target, Model source, boolean sourceDominant, Map<Object, Object> context) - Overrides:
mergeModel_Prerequisites
in classMavenMerger
-
mergeModel_Licenses
protected void mergeModel_Licenses(Model.Builder builder, Model target, Model source, boolean sourceDominant, Map<Object, Object> context) - Overrides:
mergeModel_Licenses
in classMavenMerger
-
mergeModel_Developers
protected void mergeModel_Developers(Model.Builder builder, Model target, Model source, boolean sourceDominant, Map<Object, Object> context) - Overrides:
mergeModel_Developers
in classMavenMerger
-
mergeModel_Contributors
protected void mergeModel_Contributors(Model.Builder builder, Model target, Model source, boolean sourceDominant, Map<Object, Object> context) - Overrides:
mergeModel_Contributors
in classMavenMerger
-
mergeModel_MailingLists
protected void mergeModel_MailingLists(Model.Builder builder, Model target, Model source, boolean sourceDominant, Map<Object, Object> context) - Overrides:
mergeModel_MailingLists
in classMavenMerger
-
mergeModelBase_Modules
protected void mergeModelBase_Modules(ModelBase.Builder builder, ModelBase target, ModelBase source, boolean sourceDominant, Map<Object, Object> context) - Overrides:
mergeModelBase_Modules
in classMavenMerger
-
mergeModelBase_Repositories
protected void mergeModelBase_Repositories(ModelBase.Builder builder, ModelBase target, ModelBase source, boolean sourceDominant, Map<Object, Object> context) - Overrides:
mergeModelBase_Repositories
in classMavenMerger
-
mergeModelBase_PluginRepositories
protected void mergeModelBase_PluginRepositories(ModelBase.Builder builder, ModelBase target, ModelBase source, boolean sourceDominant, Map<Object, Object> context) - Overrides:
mergeModelBase_PluginRepositories
in classMavenMerger
-
mergeBuildBase_Filters
protected void mergeBuildBase_Filters(BuildBase.Builder builder, BuildBase target, BuildBase source, boolean sourceDominant, Map<Object, Object> context) - Overrides:
mergeBuildBase_Filters
in classMavenMerger
-
mergeBuildBase_Resources
protected void mergeBuildBase_Resources(BuildBase.Builder builder, BuildBase target, BuildBase source, boolean sourceDominant, Map<Object, Object> context) - Overrides:
mergeBuildBase_Resources
in classMavenMerger
-
mergeBuildBase_TestResources
protected void mergeBuildBase_TestResources(BuildBase.Builder builder, BuildBase target, BuildBase source, boolean sourceDominant, Map<Object, Object> context) - Overrides:
mergeBuildBase_TestResources
in classMavenMerger
-
mergeDistributionManagement_Relocation
protected void mergeDistributionManagement_Relocation(DistributionManagement.Builder builder, DistributionManagement target, DistributionManagement source, boolean sourceDominant, Map<Object, Object> context) - Overrides:
mergeDistributionManagement_Relocation
in classMavenMerger
-
mergeDistributionManagement_Repository
protected void mergeDistributionManagement_Repository(DistributionManagement.Builder builder, DistributionManagement target, DistributionManagement source, boolean sourceDominant, Map<Object, Object> context) - Overrides:
mergeDistributionManagement_Repository
in classMavenMerger
-
mergeDistributionManagement_SnapshotRepository
protected void mergeDistributionManagement_SnapshotRepository(DistributionManagement.Builder builder, DistributionManagement target, DistributionManagement source, boolean sourceDominant, Map<Object, Object> context) - Overrides:
mergeDistributionManagement_SnapshotRepository
in classMavenMerger
-
mergeDistributionManagement_Site
protected void mergeDistributionManagement_Site(DistributionManagement.Builder builder, DistributionManagement target, DistributionManagement source, boolean sourceDominant, Map<Object, Object> context) - Overrides:
mergeDistributionManagement_Site
in classMavenMerger
-
mergeSite_ChildSiteUrlInheritAppendPath
protected void mergeSite_ChildSiteUrlInheritAppendPath(Site.Builder builder, Site target, Site source, boolean sourceDominant, Map<Object, Object> context) - Overrides:
mergeSite_ChildSiteUrlInheritAppendPath
in classMavenMerger
-
isSiteEmpty
-
mergeSite_Url
protected void mergeSite_Url(Site.Builder builder, Site target, Site source, boolean sourceDominant, Map<Object, Object> context) - Overrides:
mergeSite_Url
in classMavenMerger
-
mergeScm_Url
protected void mergeScm_Url(Scm.Builder builder, Scm target, Scm source, boolean sourceDominant, Map<Object, Object> context) - Overrides:
mergeScm_Url
in classMavenMerger
-
mergeScm_Connection
protected void mergeScm_Connection(Scm.Builder builder, Scm target, Scm source, boolean sourceDominant, Map<Object, Object> context) - Overrides:
mergeScm_Connection
in classMavenMerger
-
mergeScm_DeveloperConnection
protected void mergeScm_DeveloperConnection(Scm.Builder builder, Scm target, Scm source, boolean sourceDominant, Map<Object, Object> context) - Overrides:
mergeScm_DeveloperConnection
in classMavenMerger
-
mergePlugin_Executions
protected void mergePlugin_Executions(Plugin.Builder builder, Plugin target, Plugin source, boolean sourceDominant, Map<Object, Object> context) - Overrides:
mergePlugin_Executions
in classMavenMerger
-
mergePluginExecution_Goals
protected void mergePluginExecution_Goals(PluginExecution.Builder builder, PluginExecution target, PluginExecution source, boolean sourceDominant, Map<Object, Object> context) - Overrides:
mergePluginExecution_Goals
in classMavenMerger
-
mergeReportPlugin_ReportSets
protected void mergeReportPlugin_ReportSets(ReportPlugin.Builder builder, ReportPlugin target, ReportPlugin source, boolean sourceDominant, Map<Object, Object> context) - Overrides:
mergeReportPlugin_ReportSets
in classMavenMerger
-
getDependencyKey
- Overrides:
getDependencyKey
in classMavenMerger
-
getPluginKey
- Overrides:
getPluginKey
in classMavenMerger
-
getPluginExecutionKey
- Overrides:
getPluginExecutionKey
in classMavenMerger
-
getReportPluginKey
- Overrides:
getReportPluginKey
in classMavenMerger
-
getReportSetKey
- Overrides:
getReportSetKey
in classMavenMerger
-
getRepositoryBaseKey
- Overrides:
getRepositoryBaseKey
in classMavenMerger
-
getExtensionKey
- Overrides:
getExtensionKey
in classMavenMerger
-
getExclusionKey
- Overrides:
getExclusionKey
in classMavenMerger
-
extrapolateChildUrl
-