Skip to content

Symbolic link within local repository directory makes every cached artifact "not present" #2183

Closed

Description

@findepi

Affected version

2.0.24

Bug description

Problem

Since Resolver 2.0.23 (#2080), the enhanced local repository manager treats every
artifact as not present if its path below the local repository base directory
goes through a symbolic link, even when the file name matches the requested
coordinates exactly:

[WARNING] Rejecting locally cached artifact <worktree>/.mvn-repo/cached/org/apache/maven/plugins/maven-install-plugin/3.2.0/maven-install-plugin-3.2.0.pom: its on-disk path ../../shared/cache/org/apache/maven/plugins/maven-install-plugin/3.2.0/maven-install-plugin-3.2.0.pom does not match the requested coordinates (filesystem case/normalization alias); treating it as not present

Repro

When working with git worktrees, each worktree should have its own local repository,
so that mvn install in one worktree is not visible to the others. However,
each worktree should not download all dependencies from the internet anew.
This can be set up like this:

<worktree>/
- .mvn-repo/
  - cached -> /shared/cache
  - installed/

Maven is then run with -Dmaven.repo.local=${session.rootDirectory}/.mvn-repo -Daether.enhancedLocalRepository.split=true.

With Maven 3.9.x (Resolver 1.9) this just works. With Maven 3.10.0 (Resolver 2.0.24):

  • online builds download every artifact again on every build,
  • offline builds fail:
    [ERROR] Plugin org.apache.maven.plugins:maven-install-plugin:3.2.0 or one of its dependencies could not be resolved
    

The only workaround is -Daether.lrm.enhanced.verifyRealPath=false, which disables
the case-alias protection altogether.

Activity

  1. findepi commented on Oct 7, 2026

    @findepi
    MemberAuthor
  2. findepi commented on Oct 7, 2026

    @findepi
    MemberAuthor
  3. added a commit that references this issue on Oct 12, 2026
    05b2e68
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions