Sorry for the long description:
Background: I have 2 projects, let's say A and B. Builds in Project A deploy to Nexus Repository Manager OSS 2.12.0 repo A, and builds in Project B deploy to Nexus repo B. My maven project needs to use .jars from both repo A and repo B.
Therefore, I configured my maven.settings file to use 2 different Nexus repositories (Having 2 mirrors).
Now, I see that when I compile my maven project, it will go through repo A, search for the jar, then go through repo B, search for the jar. When it finds the jar, it will download it.
Problem: I used to use Repo B for both project A and project B's jars (the owner of the repo kicked me out). Therefore, I now have the same 0.0.1-SNAPSHOT of a component in both repo A, and repo B.
Maven now downloads both these snapshots during compilation.
Question: How does maven resolve which .jar to use if both have the same name (ex: componentName-0.0.1-SNAPSHOT) ? I see that in my local ./m2 repository, there's a resolver-status file, but I'm unsure of how it resolves between both the jars. Ideally, I would want maven to use the most recently updated (based on timestamp) jar.