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

Dependency resolution appears to misbehave if a remote repository uses the id "local"

    XMLWordPrintableJSON

Details

    Description

      Consider something like

      <mirror>
        <id>local</id>
        <mirrorOf>*</mirrorOf>
        <url>http://localhost/mymirror</url>
      </mirror>
      

      in the settings. Note in particular that the mirror uses the id "local". This severely impacts dependency resolution as this repo id is internally used for the local repository. In particular the path to the locally stored repo metadata uses this id, i.e. maven-metadata-local.xml, making it impossible for Maven to distinguish the real local repo metadata from the remote repo called "local".

      Possible error scenario:

      • user installs local snapshot of a artifact A
      • Maven checks remote repo "local" for updates of A, thereby overwriting maven-metadata-local.xml and erasing the information about the local snapshot
      • Maven downloads snapshot version of A from the remote repo, regardless of its age compared to the locally installed snapshot

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: