Howdy,

The Maven local repository contains two kinds of artifacts lumped together:
- cached ones from remote
- locally built and installed

This message matters the cached ones: "present but unavailable" means
following:
- file IS present (so it was cached)
- but is unavailable, as it was cached as part of some OTHER remote
repository than that exists in current execution

Maven3 uses this implementation of local repository
https://maven.apache.org/resolver/apidocs/org/eclipse/aether/internal/impl/EnhancedLocalRepositoryManagerFactory.html

And check out the javadoc it: it tracks the "origin" (basically remote
repository ID) of cached artifacts, and "emulates" physically separated
caches (same can be achieved "for real" with split local repository).

In short: the repository ID that was stored as artifact origin is NOT
available in your subsequent build, hence, Maven3 does not use it (is
unavailable, but present physically in cache/local repository).

HTH
T

On Mon, Nov 6, 2023 at 1:10 PM Arno Schatz <a...@xerai.biz> wrote:

> Hi,
>
> I am trying to use the offline mode (mvn -o clean install) and getting the
> error message
> "The following artifacts could not be resolved: org.dom4j:dom4j:jar:2.1.3
> (present, but unavailable)"
> for very many dependencies.
>
> My main computer and a VM share the same file system. The VM is connected
> to the company's repository (artefactory)
> through VPN. On the VM, I checkout the project and successfully build it
> and successfully ran "mvn dependency:go-offline".
>
> The I switched to my main computer and tried "mvn -o clean install" but it
> failed with the above error message. I also
> tried to set
>   <offline>true</offline>
> in settings.xml in my main computer but that didnt change anything.
> What does the "(present, but unavailable)" in the error message mean?
>
> thanks,
>     Arno
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>

Reply via email to