Class ConfigurationMerger


  • class ConfigurationMerger
    extends java.lang.Object
    • Constructor Detail

      • ConfigurationMerger

        ConfigurationMerger()
    • Method Detail

      • mergeProperties

        private void mergeProperties​(java.util.Properties dominant,
                                     java.util.Properties recessive)
      • mergeRepositories

        private void mergeRepositories​(java.util.List<Repository> dominant,
                                       java.util.List<Repository> recessive)
      • mergeArtifactmanagement

        private void mergeArtifactmanagement​(java.util.List<PackagingRule> dominant,
                                             java.util.List<PackagingRule> recessive)
      • merge

        public Configuration merge​(Configuration dominant,
                                   Configuration recessive)
        Merge two configurations, with one with one having precedence in the case of conflict.

        Caller should not depend on contents of dominant configuration after the merge was attempted as the implementation is free to modify it. Recessive configuration is never changed.

        Parameters:
        dominant - the dominant configuration into which the recessive configuration will be merged (may be null)
        recessive - the recessive configuration from which the configuration will inherited (may not be null )
        Returns:
        merged configuration (not null, may be the same as dominant)