Skip to content

[MNG-5474] combine.children="merge" has reversed ordering of combine.children="append" #6870

Open

Description

@jira-importer

Tobias Oberlies opened MNG-5474 and commented

I have a configuration parameter that has a list of child elements (which themselves contain configuration elements). The child elements have distinct names, but their order matters. They each denote a pre-condition, and I want to be able to specify which one wins in case multiple pre-conditions apply.

Obviously, I want more specific configuration (e.g. execution level > plugin level) to win. As a plugin, I only get the merged configuration as list (using the parameter type PlexusConfiguration). So to achieve the desired precedence, I need to rely on the order of the child elements.

I was surprised to see that combine.children="merge" and combine.children="append" give opposite results. For the former, more specific configuration is a the top whereas for the latter, the more specific configuration is at the end of the list.

Example:

<configuration>
  <myParam combine.children="append">
    <parentMgtConfig>...</parentMgtConfig>
    <parentConfig>...</parentConfig>
    <pluginConfig>...</pluginConfig>
    <execConfig>...</execConfig>
  </myParam>
</configuration>
<configuration>
  <myParam combine.children="merge">
    <execConfig>...</execConfig>
    <pluginConfig>...</pluginConfig>
    <parentConfig>...</parentConfig>
    <parentMgtConfig>...</parentMgtConfig>
  </myParam>
</configuration>

I think that combine.children="merge" should also be in parent-first order.


Affects: 3.0.5

Issue Links:

  • MJAR-172 Manifest entries are in wrong (visual) order

0 votes, 5 watchers

Activity

  1. jira-importer commented on Feb 15, 2014

    @jira-importer
    Author

    Jason van Zyl commented

    I think it makes sense that the order be preserved in the same way. I can't think of a reason not to.

  2. jira-importer commented on Dec 23, 2019

    @jira-importer
    Author

    Elliotte Rusty Harold commented

    can we fix this without breaking compatibility?

  3. added
    bug
    priority:minor
    on Jul 6, 2025
  4. modified the milestones: , 4.x on Jul 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugpriority:minor

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions