Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.2.1
-
None
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