findepi opened a new issue, #2183:
URL: https://github.com/apache/maven-resolver/issues/2183
### 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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]