Skip to content

[MNG-5180] Versioning's snapshot version list is not included in metadata merge  #7003

Closed

Description

@jira-importer

Noam Y. Tenne opened MNG-5180 and commented

Versioning#snapshotVersions is not being merged when using Metadata#merge.


Affects: 3.0.3

Attachments:

Issue Links:

  • MNG-7418 Incorrect merging of snapshot versions in o.a.m.artifact.repository.metadata.Metadata.merge(...)
    ("is duplicated by")
  • WAGON-411 Enhance merge-maven-repos to work with SNAPSHOT builds

Remote Links:

Backported to: 4.0.0-alpha-2, 3.8.5

0 votes, 8 watchers

Activity

  1. jira-importer commented on Oct 3, 2011

    @jira-importer
    Author

    Noam Y. Tenne commented

    Adding test case.

  2. jira-importer commented on Jan 22, 2014

    @jira-importer
    Author
  3. jira-importer commented on Nov 12, 2018

    @jira-importer
    Author
  4. jira-importer commented on Jul 24, 2019

    @jira-importer
    Author

    Michael Osipov commented

    Does this one still apply?

  5. jira-importer commented on Jun 6, 2020

    @jira-importer
    Author

    Michael Osipov commented

    No feedback for a year.

  6. jira-importer commented on Sep 1, 2020

    @jira-importer
    Author

    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

  7. jira-importer commented on Sep 1, 2020

    @jira-importer
    Author

    Michael Osipov commented

    Still persists.

  8. jira-importer commented on Sep 7, 2020

    @jira-importer
    Author

    Tomi Pakarinen commented

    I made PR #371
    This replaces snapshots versions during merge if version is new, timestamp or build number have changed.

  9. jira-importer commented on Oct 4, 2020

    @jira-importer
    Author

    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?

  10. jira-importer commented on Feb 22, 2022

    @jira-importer
    Author

    Konrad Windszus commented

    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

    1. classifier, extension act as key in the list
    2. every item in the list must have a unique key
    3. 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:

    1. How to calculate versioning->snapshot->buildNumber when merging modified the snapshot versions? Probably we just take over during merge without touching.
    2. Is versioning->snapshot->timestamp the same date format as {}versioning->snapshotVersions->updated{}?
  11. jira-importer commented on Feb 22, 2022

    @jira-importer
    Author

    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.

  12. jira-importer commented on Feb 22, 2022

    @jira-importer
    Author

    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?

  13. jira-importer commented on Feb 22, 2022

    @jira-importer
    Author

    Michael Osipov commented

    No, as far as I know only these two.

  14. jira-importer commented on Feb 22, 2022

    @jira-importer
    Author

    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.

  15. jira-importer commented on Feb 23, 2022

    @jira-importer
    Author

    Michael Osipov commented

    The versioning->snapshot should always contain the most recent item, i.e. the one with the more recent {}versioning->snapshot->timestamp{}.
    Michael Osipov WDYT?

    Correct.

  16. jira-importer commented on Feb 23, 2022

    @jira-importer
    Author

    Michael Osipov commented

    Is versioning->snapshot->timestamp the same date format as {}versioning->snapshotVersions->updated{}?

    I would assume so.

  17. jira-importer commented on Feb 23, 2022

    @jira-importer
    Author

    Michael Osipov commented

    How to calculate versioning->snapshot->buildNumber when merging modified the snapshot versions? Probably we just take over during merge without touching.

    Increment?

  18. jira-importer commented on Feb 23, 2022

    @jira-importer
    Author

    Konrad Windszus commented

    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).

  19. jira-importer commented on Feb 27, 2022

    @jira-importer
    Author
  20. added
    bug
    priority:major
    on Jul 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugpriority:major

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions