I was recently quite puzzled on why Maven is trying to download a
dependency already present in the local repository and I tracked it
down to this comment in EnhancedLocalRepositoryManager:
"artifact downloaded from remote repository is accepted only
downloaded from request repositories"
So regardless of the artifact being present in the local repository an
attempt is made to download it again if the id of the repository
doesn't match the id of the repository stored in
I think that this will prevent anyone trying to reuse a local
repository with artifacts downloaded from unknown/unconfigured
repository in an offline build.
Can someone shed some light on the rationale behind this?