You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[MNG-5180] Versioning's snapshot version list is not included in metadata merge #7003
Tomi Pakarinen, looking at this. As far as I undertand, the plugin's goal does not work correctly because of this bug? Can you provide an example or an IT with shows this issue?
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 Osipov 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{}?
Konrad Windszus, before going through your comment, I remember that Resolver handles this as well. So both logics (here an Resolver) should be consistent. Please have a look there before we continue discussion.
The idea is, that this merging is agnostic of the resolver provider impl, but I will check that the one in Maven behaves the same. Are there any other Resolver provider impls to consider?
That was a misunderstanding, only one SNAPSHOT version is supposed to be referenced in the snapshot metadata (the most recent one), the older ones are not linked to metadata.
The versioning->snapshot should always contain the most recent item, i.e. the one with the more recent {}versioning->snapshot->timestamp{}. Michael Osipov WDYT?
How to calculate versioning->snapshot->buildNumber when merging modified the snapshot versions? Probably we just take over during merge without touching.
In the PR there are more details now, actually snapshot->timestamp and snapshotVersion->updated are different formats. I also clarified that in the mdo. Also the metadata file is only containing info about the most recent artifacts (not all old ones with the same SNAPSHOT version).
Activity
jira-importer commentedon Oct 3, 2011
Noam Y. Tenne commented
Adding test case.
jira-importer commentedon Jan 22, 2014
Jason van Zyl commented
Please refer to https://cwiki.apache.org/confluence/display/MAVEN/The+Great+JIRA+Cleanup+of+2014
jira-importer commentedon Jan 22, 2014
Jason van Zyl commented
Please refer to https://cwiki.apache.org/confluence/display/MAVEN/The+Great+JIRA+Cleanup+of+2014 if you're wondering why this issue was closed out.
jira-importer commentedon Nov 12, 2018
Przemysław Fusik commented
#191
jira-importer commentedon Jul 24, 2019
Michael Osipov commented
Does this one still apply?
jira-importer commentedon Jun 6, 2020
Michael Osipov commented
No feedback for a year.
jira-importer commentedon Sep 1, 2020
Tomi Pakarinen commented
This is still valid issue. Wagon plugin's 'merge-maven-repos' task do not update metadata correctly on snapshots because of this
jira-importer commentedon Sep 1, 2020
Michael Osipov commented
Still persists.
jira-importer commentedon Sep 7, 2020
Tomi Pakarinen commented
I made PR #371
This replaces snapshots versions during merge if version is new, timestamp or build number have changed.
jira-importer commentedon Oct 4, 2020
Michael Osipov commented
Tomi Pakarinen, looking at this. As far as I undertand, the plugin's goal does not work correctly because of this bug? Can you provide an example or an IT with shows this issue?
jira-importer commentedon Feb 22, 2022
Konrad Windszus commented
I think the logic for merging
versioning->snapshotVersionsshould be as follows according to https://maven.apache.org/ref/3.8.3/maven-repository-metadata/repository-metadata.htmlupdatedvalue should be used in the resulting item if it is newerThe
versioning->snapshotshould always contain the most recent item, i.e. the one with the more recent{}versioning->snapshot->timestamp{}.Michael Osipov WDYT?
Open Questions:
versioning->snapshot->buildNumberwhen merging modified the snapshot versions? Probably we just take over during merge without touching.versioning->snapshot->timestampthe same date format as{}versioning->snapshotVersions->updated{}?jira-importer commentedon Feb 22, 2022
Michael Osipov commented
Konrad Windszus, before going through your comment, I remember that Resolver handles this as well. So both logics (here an Resolver) should be consistent. Please have a look there before we continue discussion.
jira-importer commentedon Feb 22, 2022
Konrad Windszus commented
The idea is, that this merging is agnostic of the resolver provider impl, but I will check that the one in Maven behaves the same. Are there any other Resolver provider impls to consider?
jira-importer commentedon Feb 22, 2022
Michael Osipov commented
No, as far as I know only these two.
jira-importer commentedon Feb 22, 2022
Konrad Windszus commented
-Actually even https://repository.apache.org/content/repositories/snapshots/org/apache/maven/maven-core/4.0.0-alpha-1-SNAPSHOT/maven-metadata.xml seems to be broken, as although I see 4 different versions for both "jar" and "pom" only one version is listed in the snapshotVersions.-
That was a misunderstanding, only one SNAPSHOT version is supposed to be referenced in the snapshot metadata (the most recent one), the older ones are not linked to metadata.
jira-importer commentedon Feb 23, 2022
Michael Osipov commented
Correct.
jira-importer commentedon Feb 23, 2022
Michael Osipov commented
I would assume so.
jira-importer commentedon Feb 23, 2022
Michael Osipov commented
Increment?
jira-importer commentedon Feb 23, 2022
Konrad Windszus commented
In the PR there are more details now, actually
snapshot->timestampandsnapshotVersion->updatedare different formats. I also clarified that in the mdo. Also the metadata file is only containing info about the most recent artifacts (not all old ones with the same SNAPSHOT version).jira-importer commentedon Feb 27, 2022
Michael Osipov commented
Fixed with 1e33a572643628e7742eda2d469e4bd04b880523 and with 05e96dae96030864cb2ab3a3ae877f6bb9e134f7 for
maven-3.8.xbranch.