You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Zoran Regvart <zo...@regvart.com> on 2018/12/21 12:04:56 UTC

Puzzling Aether behaviour

Hi Mavenistas,
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[1]:

"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
`_remote.repositories` file.

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?

Thanks :)

zoran

[1] https://github.com/eclipse/aether-core/blob/4cf5f7a406b516a45d8bf15e7dfe3fb3849cb87b/aether-impl/src/main/java/org/eclipse/aether/internal/impl/EnhancedLocalRepositoryManager.java#L106-L107
-- 
Zoran Regvart

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org