You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Tamas Cservenak (Jira)" <ji...@apache.org> on 2025/05/02 14:42:00 UTC
[jira] [Assigned] (MNG-8720) Warning about root directory and multiModuleProjectDirectory not being aligned doesn't account for symlinks
[ https://issues.apache.org/jira/browse/MNG-8720?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tamas Cservenak reassigned MNG-8720:
------------------------------------
Assignee: Tamas Cservenak
> Warning about root directory and multiModuleProjectDirectory not being aligned doesn't account for symlinks
> -----------------------------------------------------------------------------------------------------------
>
> Key: MNG-8720
> URL: https://issues.apache.org/jira/browse/MNG-8720
> Project: Maven
> Issue Type: Bug
> Components: Command Line, Core
> Affects Versions: 4.0.0-rc-3
> Reporter: Henning Hoefer
> Assignee: Tamas Cservenak
> Priority: Minor
> Fix For: 4.0.0-rc-4
>
>
> When you have a symlink in your project path, the warning "{{{}Project root directory and multiModuleProjectDirectory are not aligned{}}}" is always triggered.
> The reason is, that [in DefaultRootLocator|https://github.com/apache/maven/blob/maven-4.0.0-rc-3/impl/maven-impl/src/main/java/org/apache/maven/impl/model/rootlocator/DefaultRootLocator.java#L67], both paths are compared with {{Objects.equals}} instead of {{{}Files.isSameFile{}}}, when the root is resolved by the JVM (resulting in a canonical path) while the fallback directory is using the property passed in from the bash start script (which doesn't resolve the found path to a canonical one).
> This can either be fixed in the {{DefaultRootLocator}} as described above, or in the start script, by resolving the found root using {{realpath}} (might not be available on Windows though?).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)