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

Maven caches missing snapshot dependencies, so further builds fail without checking the repo until the cache expires or -U is included to flush the cache

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Incomplete
    • 2.0.5
    • None
    • None

    Description

      The problem is caused by a slightly obscure sequence, in this example, I use two projects, Server & Common. Server depends on Common:

      Alice updates Server to depend on Common-1.2-SNAPSHOT instead of 1.1-SNAPSHOT and commits that change.

      Bob syncs that change and attempts a build of Server, maven checks for Common-1.2-SNAPSHOT in the local repo, finds it missing and checks the global repo, where it is also missing. Maven records this information in a cache and fails the build.

      Alice deploys Common-1.2-SNAPSHOT to the global repo.

      Bob attempts to build Server again, maven checks it's cached information and finds that Common-1.2-SNAPSHOT wasn't in the global repo last time, so fails the build.

      Maven should not fail the build due to missing dependencies simply because the cache says the dependency was missing last time. It should check the configured repos before failing.

      Attachments

        1. MNG-3035.zip
          3 kB
          Tom Parker

        Issue Links

          Activity

            People

              Unassigned Unassigned
              carrott Tom Parker
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: