Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-4955

[regression] Outdated remote snapshots are preferred over locally installed snapshots

    XMLWordPrintableJSON

Details

    Description

      When using the new metadata format, remote snapshots listed by locally cached maven-metadata-*.xml will always be selected regardless of their relative age compared to any locally installed snapshots. To repro:
      a) "mvn deploy" lib-a
      b) wait a few seconds
      c) "mvn install" lib-a, this creates a local snapshot that is newer than the remote snapshot
      d) in a dependent project lib-b, "mvn compile -U"

      The -U flag to enforce metadata download is rather crucial as otherwise the feature introduced for MNG-4326 hides the defect.

      Besides the expected download of the remote metadata, Maven erroneously also downloads/uses the outdated remote snapshots.

      Attachments

        Activity

          People

            bentmann Benjamin Bentmann
            bentmann Benjamin Bentmann
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: