Maven Virtual Repo should not go through all the remote repo after finding a Snapshot artifact with a specific version request.
When a Virtual Maven repo has multiple remote repos(around 20 or so) and if the artifact(with specific version) exists in the top remote repo(top in the virtual repo layout) then the artifact should be returned from that top repo and the Virtual repo strategy should not go through the remaining remote repos.
Steps to reproduce:
- For instance, Create five(or any number) remote repos for Maven, all pointing to https://jcenter.bintray.com (repos with different names)
- Create the sixth remote Maven repo pointing to a local Maven repo which has Maven artifacts
- Create a Virtual Maven repo with 6 remote repos created earlier
- To see the trace and the issue behavior use curl command to attempt to resolve the artifact through the Virtual repo create above
- Sample curl command(and artifact with a particular version) used for test:
This issue was reproduced in 5.11.2, 5.4.12 and latest version 6.4.1