[
https://issues.apache.org/jira/browse/MNG-6824?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17001748#comment-17001748
]
Robert Scholte edited comment on MNG-6824 at 12/21/19 4:51 PM:
---------------------------------------------------------------
Fixed in
[11b8b2d5d4f327ad3e38275015a3aafbdc2c2c5c|https://gitbox.apache.org/repos/asf?p=maven.git;a=commit;h=11b8b2d5d4f327ad3e38275015a3aafbdc2c2c5c]
modules are now merged as expected.
ModelMerger has several subclasses that are responsible for merging based on
inheritence, so merging on instance by default is fine here.
was (Author: rfscholte):
modules are now merged as expected.
ModelMerger has several subclasses that are responsible for merging based on
inheritence, so merging on instance by default is fine here.
> 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: 3.7.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:
> - project.modules is a new List, adding both original modules
> - 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.3.4#803005)