Puzzling Aether behaviour

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Puzzling Aether behaviour

Zoran Regvart
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 :)


[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: [hidden email]
For additional commands, e-mail: [hidden email]