Class MavenModelMerger

java.lang.Object
org.apache.maven.model.v4.MavenMerger
org.apache.maven.model.merge.MavenModelMerger
Direct Known Subclasses:
DefaultDependencyManagementInjector.ManagementModelMerger, DefaultInheritanceAssembler.InheritanceModelMerger, DefaultModelNormalizer.DuplicateMerger, DefaultPluginManagementInjector.ManagementModelMerger, DefaultProfileInjector.ProfileModelMerger

public class MavenModelMerger extends MavenMerger
The domain-specific model merger for the Maven POM, overriding generic code from parent class when necessary with more adapted algorithms.
Author:
Benjamin Bentmann
  • Field Details

    • CHILD_PATH_ADJUSTMENT

      public static final String CHILD_PATH_ADJUSTMENT
      The hint key for the child path adjustment used during inheritance for URL calculations.
      See Also:
    • ARTIFACT_ID

      public static final String ARTIFACT_ID
      The context key for the artifact id of the target model.
      See Also:
  • Constructor Details

    • MavenModelMerger

      public MavenModelMerger()
  • Method Details

    • mergeModel

      protected org.apache.maven.api.model.Model mergeModel(org.apache.maven.api.model.Model target, org.apache.maven.api.model.Model source, boolean sourceDominant, Map<Object,Object> context)
      Overrides:
      mergeModel in class MavenMerger
    • mergeModel_Name

      protected void mergeModel_Name(org.apache.maven.api.model.Model.Builder builder, org.apache.maven.api.model.Model target, org.apache.maven.api.model.Model source, boolean sourceDominant, Map<Object,Object> context)
      Overrides:
      mergeModel_Name in class MavenMerger
    • mergeModel_Url

      protected void mergeModel_Url(org.apache.maven.api.model.Model.Builder builder, org.apache.maven.api.model.Model target, org.apache.maven.api.model.Model source, boolean sourceDominant, Map<Object,Object> context)
      Overrides:
      mergeModel_Url in class MavenMerger
    • mergeModel_Organization

      protected void mergeModel_Organization(org.apache.maven.api.model.Model.Builder builder, org.apache.maven.api.model.Model target, org.apache.maven.api.model.Model source, boolean sourceDominant, Map<Object,Object> context)
      Overrides:
      mergeModel_Organization in class MavenMerger
    • mergeModel_IssueManagement

      protected void mergeModel_IssueManagement(org.apache.maven.api.model.Model.Builder builder, org.apache.maven.api.model.Model target, org.apache.maven.api.model.Model source, boolean sourceDominant, Map<Object,Object> context)
      Overrides:
      mergeModel_IssueManagement in class MavenMerger
    • mergeModel_CiManagement

      protected void mergeModel_CiManagement(org.apache.maven.api.model.Model.Builder builder, org.apache.maven.api.model.Model target, org.apache.maven.api.model.Model source, boolean sourceDominant, Map<Object,Object> context)
      Overrides:
      mergeModel_CiManagement in class MavenMerger
    • mergeModel_ModelVersion

      protected void mergeModel_ModelVersion(org.apache.maven.api.model.Model.Builder builder, org.apache.maven.api.model.Model target, org.apache.maven.api.model.Model source, boolean sourceDominant, Map<Object,Object> context)
      Overrides:
      mergeModel_ModelVersion in class MavenMerger
    • mergeModel_ArtifactId

      protected void mergeModel_ArtifactId(org.apache.maven.api.model.Model.Builder builder, org.apache.maven.api.model.Model target, org.apache.maven.api.model.Model source, boolean sourceDominant, Map<Object,Object> context)
      Overrides:
      mergeModel_ArtifactId in class MavenMerger
    • mergeModel_Profiles

      protected void mergeModel_Profiles(org.apache.maven.api.model.Model.Builder builder, org.apache.maven.api.model.Model target, org.apache.maven.api.model.Model source, boolean sourceDominant, Map<Object,Object> context)
      Overrides:
      mergeModel_Profiles in class MavenMerger
    • mergeModel_Prerequisites

      protected void mergeModel_Prerequisites(org.apache.maven.api.model.Model.Builder builder, org.apache.maven.api.model.Model target, org.apache.maven.api.model.Model source, boolean sourceDominant, Map<Object,Object> context)
      Overrides:
      mergeModel_Prerequisites in class MavenMerger
    • mergeModel_Licenses

      protected void mergeModel_Licenses(org.apache.maven.api.model.Model.Builder builder, org.apache.maven.api.model.Model target, org.apache.maven.api.model.Model source, boolean sourceDominant, Map<Object,Object> context)
      Overrides:
      mergeModel_Licenses in class MavenMerger
    • mergeModel_Developers

      protected void mergeModel_Developers(org.apache.maven.api.model.Model.Builder builder, org.apache.maven.api.model.Model target, org.apache.maven.api.model.Model source, boolean sourceDominant, Map<Object,Object> context)
      Overrides:
      mergeModel_Developers in class MavenMerger
    • mergeModel_Contributors

      protected void mergeModel_Contributors(org.apache.maven.api.model.Model.Builder builder, org.apache.maven.api.model.Model target, org.apache.maven.api.model.Model source, boolean sourceDominant, Map<Object,Object> context)
      Overrides:
      mergeModel_Contributors in class MavenMerger
    • mergeModel_MailingLists

      protected void mergeModel_MailingLists(org.apache.maven.api.model.Model.Builder builder, org.apache.maven.api.model.Model target, org.apache.maven.api.model.Model source, boolean sourceDominant, Map<Object,Object> context)
      Overrides:
      mergeModel_MailingLists in class MavenMerger
    • mergeModelBase_Modules

      protected void mergeModelBase_Modules(org.apache.maven.api.model.ModelBase.Builder builder, org.apache.maven.api.model.ModelBase target, org.apache.maven.api.model.ModelBase source, boolean sourceDominant, Map<Object,Object> context)
      Overrides:
      mergeModelBase_Modules in class MavenMerger
    • mergeModelBase_Repositories

      protected void mergeModelBase_Repositories(org.apache.maven.api.model.ModelBase.Builder builder, org.apache.maven.api.model.ModelBase target, org.apache.maven.api.model.ModelBase source, boolean sourceDominant, Map<Object,Object> context)
      Overrides:
      mergeModelBase_Repositories in class MavenMerger
    • mergeModelBase_PluginRepositories

      protected void mergeModelBase_PluginRepositories(org.apache.maven.api.model.ModelBase.Builder builder, org.apache.maven.api.model.ModelBase target, org.apache.maven.api.model.ModelBase source, boolean sourceDominant, Map<Object,Object> context)
      Overrides:
      mergeModelBase_PluginRepositories in class MavenMerger
    • mergeBuildBase_Filters

      protected void mergeBuildBase_Filters(org.apache.maven.api.model.BuildBase.Builder builder, org.apache.maven.api.model.BuildBase target, org.apache.maven.api.model.BuildBase source, boolean sourceDominant, Map<Object,Object> context)
      Overrides:
      mergeBuildBase_Filters in class MavenMerger
    • mergeBuildBase_Resources

      protected void mergeBuildBase_Resources(org.apache.maven.api.model.BuildBase.Builder builder, org.apache.maven.api.model.BuildBase target, org.apache.maven.api.model.BuildBase source, boolean sourceDominant, Map<Object,Object> context)
      Overrides:
      mergeBuildBase_Resources in class MavenMerger
    • mergeBuildBase_TestResources

      protected void mergeBuildBase_TestResources(org.apache.maven.api.model.BuildBase.Builder builder, org.apache.maven.api.model.BuildBase target, org.apache.maven.api.model.BuildBase source, boolean sourceDominant, Map<Object,Object> context)
      Overrides:
      mergeBuildBase_TestResources in class MavenMerger
    • mergeDistributionManagement_Relocation

      protected void mergeDistributionManagement_Relocation(org.apache.maven.api.model.DistributionManagement.Builder builder, org.apache.maven.api.model.DistributionManagement target, org.apache.maven.api.model.DistributionManagement source, boolean sourceDominant, Map<Object,Object> context)
      Overrides:
      mergeDistributionManagement_Relocation in class MavenMerger
    • mergeDistributionManagement_Repository

      protected void mergeDistributionManagement_Repository(org.apache.maven.api.model.DistributionManagement.Builder builder, org.apache.maven.api.model.DistributionManagement target, org.apache.maven.api.model.DistributionManagement source, boolean sourceDominant, Map<Object,Object> context)
      Overrides:
      mergeDistributionManagement_Repository in class MavenMerger
    • mergeDistributionManagement_SnapshotRepository

      protected void mergeDistributionManagement_SnapshotRepository(org.apache.maven.api.model.DistributionManagement.Builder builder, org.apache.maven.api.model.DistributionManagement target, org.apache.maven.api.model.DistributionManagement source, boolean sourceDominant, Map<Object,Object> context)
      Overrides:
      mergeDistributionManagement_SnapshotRepository in class MavenMerger
    • mergeDistributionManagement_Site

      protected void mergeDistributionManagement_Site(org.apache.maven.api.model.DistributionManagement.Builder builder, org.apache.maven.api.model.DistributionManagement target, org.apache.maven.api.model.DistributionManagement source, boolean sourceDominant, Map<Object,Object> context)
      Overrides:
      mergeDistributionManagement_Site in class MavenMerger
    • mergeSite_ChildSiteUrlInheritAppendPath

      protected void mergeSite_ChildSiteUrlInheritAppendPath(org.apache.maven.api.model.Site.Builder builder, org.apache.maven.api.model.Site target, org.apache.maven.api.model.Site source, boolean sourceDominant, Map<Object,Object> context)
      Overrides:
      mergeSite_ChildSiteUrlInheritAppendPath in class MavenMerger
    • isSiteEmpty

      protected boolean isSiteEmpty(org.apache.maven.api.model.Site site)
    • mergeSite_Url

      protected void mergeSite_Url(org.apache.maven.api.model.Site.Builder builder, org.apache.maven.api.model.Site target, org.apache.maven.api.model.Site source, boolean sourceDominant, Map<Object,Object> context)
      Overrides:
      mergeSite_Url in class MavenMerger
    • mergeScm_Url

      protected void mergeScm_Url(org.apache.maven.api.model.Scm.Builder builder, org.apache.maven.api.model.Scm target, org.apache.maven.api.model.Scm source, boolean sourceDominant, Map<Object,Object> context)
      Overrides:
      mergeScm_Url in class MavenMerger
    • mergeScm_Connection

      protected void mergeScm_Connection(org.apache.maven.api.model.Scm.Builder builder, org.apache.maven.api.model.Scm target, org.apache.maven.api.model.Scm source, boolean sourceDominant, Map<Object,Object> context)
      Overrides:
      mergeScm_Connection in class MavenMerger
    • mergeScm_DeveloperConnection

      protected void mergeScm_DeveloperConnection(org.apache.maven.api.model.Scm.Builder builder, org.apache.maven.api.model.Scm target, org.apache.maven.api.model.Scm source, boolean sourceDominant, Map<Object,Object> context)
      Overrides:
      mergeScm_DeveloperConnection in class MavenMerger
    • mergePlugin_Executions

      protected void mergePlugin_Executions(org.apache.maven.api.model.Plugin.Builder builder, org.apache.maven.api.model.Plugin target, org.apache.maven.api.model.Plugin source, boolean sourceDominant, Map<Object,Object> context)
      Overrides:
      mergePlugin_Executions in class MavenMerger
    • mergePluginExecution_Goals

      protected void mergePluginExecution_Goals(org.apache.maven.api.model.PluginExecution.Builder builder, org.apache.maven.api.model.PluginExecution target, org.apache.maven.api.model.PluginExecution source, boolean sourceDominant, Map<Object,Object> context)
      Overrides:
      mergePluginExecution_Goals in class MavenMerger
    • mergeReportPlugin_ReportSets

      protected void mergeReportPlugin_ReportSets(org.apache.maven.api.model.ReportPlugin.Builder builder, org.apache.maven.api.model.ReportPlugin target, org.apache.maven.api.model.ReportPlugin source, boolean sourceDominant, Map<Object,Object> context)
      Overrides:
      mergeReportPlugin_ReportSets in class MavenMerger
    • getDependencyKey

      protected MavenMerger.KeyComputer<org.apache.maven.api.model.Dependency> getDependencyKey()
      Overrides:
      getDependencyKey in class MavenMerger
    • getPluginKey

      protected MavenMerger.KeyComputer<org.apache.maven.api.model.Plugin> getPluginKey()
      Overrides:
      getPluginKey in class MavenMerger
    • getPluginExecutionKey

      protected MavenMerger.KeyComputer<org.apache.maven.api.model.PluginExecution> getPluginExecutionKey()
      Overrides:
      getPluginExecutionKey in class MavenMerger
    • getReportPluginKey

      protected MavenMerger.KeyComputer<org.apache.maven.api.model.ReportPlugin> getReportPluginKey()
      Overrides:
      getReportPluginKey in class MavenMerger
    • getReportSetKey

      protected MavenMerger.KeyComputer<org.apache.maven.api.model.ReportSet> getReportSetKey()
      Overrides:
      getReportSetKey in class MavenMerger
    • getRepositoryBaseKey

      protected MavenMerger.KeyComputer<org.apache.maven.api.model.RepositoryBase> getRepositoryBaseKey()
      Overrides:
      getRepositoryBaseKey in class MavenMerger
    • getExtensionKey

      protected MavenMerger.KeyComputer<org.apache.maven.api.model.Extension> getExtensionKey()
      Overrides:
      getExtensionKey in class MavenMerger
    • getExclusionKey

      protected MavenMerger.KeyComputer<org.apache.maven.api.model.Exclusion> getExclusionKey()
      Overrides:
      getExclusionKey in class MavenMerger
    • extrapolateChildUrl

      protected String extrapolateChildUrl(String parentUrl, boolean appendPath, Map<Object,Object> context)