[ https://issues.apache.org/jira/browse/MNG-5474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17002066#comment-17002066 ]
Elliotte Rusty Harold commented on MNG-5474: -------------------------------------------- can we fix this without breaking compatibility? > combine.children="merge" has reversed ordering of combine.children="append" > --------------------------------------------------------------------------- > > Key: MNG-5474 > URL: https://issues.apache.org/jira/browse/MNG-5474 > Project: Maven > Issue Type: Bug > Components: POM > Affects Versions: 3.0.5 > Reporter: Tobias Oberlies > Priority: Minor > Fix For: 3.x / Backlog > > > 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: > {noformat} > <configuration> > <myParam combine.children="append"> > <parentMgtConfig>...</parentMgtConfig> > <parentConfig>...</parentConfig> > <pluginConfig>...</pluginConfig> > <execConfig>...</execConfig> > </myParam> > </configuration> > {noformat} > {noformat} > <configuration> > <myParam combine.children="merge"> > <execConfig>...</execConfig> > <pluginConfig>...</pluginConfig> > <parentConfig>...</parentConfig> > <parentMgtConfig>...</parentMgtConfig> > </myParam> > </configuration> > {noformat} > I think that {{combine.children="merge"}} should also be in parent-first > order. -- This message was sent by Atlassian Jira (v8.3.4#803005)