You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Guillaume Nodet (Jira)" <ji...@apache.org> on 2022/10/20 08:11:03 UTC

[jira] [Updated] (MNG-6824) ModelMerger is broken

     [ https://issues.apache.org/jira/browse/MNG-6824?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Guillaume Nodet updated MNG-6824:
---------------------------------
    Fix Version/s: 4.0.0-alpha-2

> ModelMerger is broken
> ---------------------
>
>                 Key: MNG-6824
>                 URL: https://issues.apache.org/jira/browse/MNG-6824
>             Project: Maven
>          Issue Type: Bug
>    Affects Versions: 3.6.3
>            Reporter: Robert Scholte
>            Assignee: Robert Scholte
>            Priority: Major
>             Fix For: 4.0.0-alpha-1, 4.0.0-alpha-2, 4.0.0
>
>
> When having 2 equal Models, you would expect that the {{ModelMerge.merge()}} would have the same result.
>  But it doesn't.
>  Some clear issues:
>  # the following all return a new List, adding both original modules
>  #- project.modules
>  #- reportSet.reports
>  #- mailingList.otherArchives
>  #- contributor.roles, build.filters
>  #- execution.goals
>  #- patternSet.includes
>  #- patternSet.excludes
>  # most (all?) keys return the instance, instead of the id-field (when available)
> The ModelMerger was an option to solve locationTracking with the build/consumer pom.
>  The original flow:
>  - rawModel (from pom , includes linenumbers) + validate
>  - rawModel+inheritence=effectiveModel + validate
> The new flow
>  - fileModel (from pom , includes linenumbers) + validate
>  - rawModel (pom + XMLFilter, so no linenumber) + validate
>  - rawModel+inheritence=effectiveModel + validate
> Validation problems of the effectiveModel can still refer to linenumbers, so Maven should be able to get these. ModelMerger was an option to merge them fileModel + rawModel to get access to the locationTracker, but with this issue we might consider a different approach.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)