Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aether-users] Using Aether for classpath management

Alexander Pokahr wrote:

When trying to resolve an artifact that is in the local repository
but not in the global repository, I get the exception below.
Is this the expected behavior?

Depends on the actual resolution request that you made and the local repository manager being used. The default local repository manager keeps track from what remote repos artifacts have been cached and only uses those artifacts during future resolution requests if those requests are configured with the original remote repository.

In more concrete terms, an artifact that was downloaded from repo A is not blindly reused for a resolution request that is only configured with repo B.

If yes, why is the global repository queried, if the artifact is locally
available?

As explained above, physically present/cached is simply not equivalent to logically available, the cache key must match or the local repo mananger considers the request a miss. In this case, a HEAD request is issued against the configured remote repos to see if the artifact actually exists and if so, the cache gets updated/extended.


Benjamin


Back to the top