[ 
https://issues.apache.org/jira/browse/MNG-5180?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17495909#comment-17495909
 ] 

Konrad Windszus edited comment on MNG-5180 at 2/23/22, 4:11 PM:
----------------------------------------------------------------

I think the logic for merging {{versioning->snapshotVersions}} should be as 
follows according to 
[https://maven.apache.org/ref/3.8.3/maven-repository-metadata/repository-metadata.html]
 # classifier, extension as key in the list
 # every item in the list must have a unique key
 # if an item with the same key is already in the list, the merged {{updated}} 
value should be used in the resulting item if it is newer

The {{versioning->snapshot}} should always contain the most recent item, i.e. 
the one with the more recent {{{}versioning->snapshot->timestamp{}}}.
[~michael-o] WDYT?

Open Questions:
 # How to calculate {{versioning->snapshot->buildNumber}} when merging modified 
the snapshot versions? Probably we just take over during merge without touching.
 # Is {{versioning->snapshot->timestamp}} the same date format as 
{{{}versioning->snapshotVersions->updated{}}}?


was (Author: kwin):
I think the logic for merging {{versioning->snapshotVersions}} should be as 
follows according to 
[https://maven.apache.org/ref/3.8.3/maven-repository-metadata/repository-metadata.html]
 # classifier, extension and value act as key in the list
 # every item in the list must have a unique key
 # if an item with the same key is already in the list, the merged {{updated}} 
value should be used in the resulting item

The {{versioning->snapshot}} should always contain the most recent item, i.e. 
the one with the more recent {{{}versioning->snapshot->timestamp{}}}.
[~michael-o] WDYT?

Open Questions:
 # How to calculate {{versioning->snapshot->buildNumber}} when merging modified 
the snapshot versions? Probably we just take over during merge without touching.
 # Is {{versioning->snapshot->timestamp}} the same date format as 
{{{}versioning->snapshotVersions->updated{}}}?

> Versioning's snapshot version list is not included in metadata merge  
> ----------------------------------------------------------------------
>
>                 Key: MNG-5180
>                 URL: https://issues.apache.org/jira/browse/MNG-5180
>             Project: Maven
>          Issue Type: Bug
>    Affects Versions: 3.0.3
>            Reporter: Noam Y. Tenne
>            Assignee: Michael Osipov
>            Priority: Major
>              Labels: must-be-in-4.0.0-alpha-1
>             Fix For: 4.0.x-candidate
>
>         Attachments: MavenMetadataSnapshotVersionsMergeTest.java
>
>
> Versioning#snapshotVersions is not being merged when using Metadata#merge.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to