[ https://issues.apache.org/jira/browse/MNG-8720?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17949936#comment-17949936 ]
Tamas Cservenak commented on MNG-8720: -------------------------------------- {noformat} [cstamas@angeleyes bar (main)]$ mvn -V validate Apache Maven 4.0.0-rc-3 (3952d00ce65df6753b63a51e86b1f626c55a8df2) Maven home: /home/cstamas/.sdkman/candidates/maven/4.0.0-rc-3 Java version: 21.0.7, vendor: Eclipse Adoptium, runtime: /home/cstamas/.sdkman/candidates/java/21.0.7-tem Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "6.14.5-300.fc42.x86_64", arch: "amd64", family: "unix" [INFO] [INFO] 1 problem was encountered while building the effective settings (use -e to see details) [INFO] [INFO] Mimir session created with DaemonNode (socketPath=/home/cstamas/.mimir/mimir-socket; daemonPID=11582; daemonVersion=0.6.0) [INFO] Scanning for projects... [WARNING] Project root directory and multiModuleProjectDirectory are not aligned [INFO] [INFO] -------------------------------------------------------< foo:bar >-------------------------------------------------------- [INFO] Building bar 0.0.1-SNAPSHOT [INFO] from pom.xml [INFO] ---------------------------------------------------------[ pom ]---------------------------------------------------------- [INFO] Copying foo:bar:pom:0.0.1-SNAPSHOT to project local repository [WARNING] Project root directory and multiModuleProjectDirectory are not aligned [INFO] Copying foo:bar:pom:consumer:0.0.1-SNAPSHOT to project local repository [INFO] -------------------------------------------------------------------------------------------------------------------------- [INFO] BUILD SUCCESS [INFO] -------------------------------------------------------------------------------------------------------------------------- [INFO] Total time: 0.050 s [INFO] Finished at: 2025-05-07T11:01:43+02:00 [INFO] -------------------------------------------------------------------------------------------------------------------------- [INFO] Mimir session closed (RETRIEVED=0 CACHED=0) [cstamas@angeleyes bar (main)]$ sdk use maven latest Using maven version latest in this shell. [cstamas@angeleyes bar (main)]$ mvn -V validate Apache Maven 4.0.0-rc-4-SNAPSHOT (4ac3b14be2668ea70740dd94e486dc877b83d38a) Maven home: /home/cstamas/Tools/maven/apache-maven-4.0.0-rc-4-SNAPSHOT Java version: 21.0.7, vendor: Eclipse Adoptium, runtime: /home/cstamas/.sdkman/candidates/java/21.0.7-tem Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "6.14.5-300.fc42.x86_64", arch: "amd64", family: "unix" [INFO] [INFO] 1 problem was encountered while building the effective settings (use -e to see details) [INFO] [INFO] Mimir session created with DaemonNode (socketPath=/home/cstamas/.mimir/mimir-socket; daemonPID=11582; daemonVersion=0.6.0) [INFO] Scanning for projects... [INFO] [INFO] -------------------------------------------------------< foo:bar >-------------------------------------------------------- [INFO] Building bar 0.0.1-SNAPSHOT [INFO] from pom.xml [INFO] ---------------------------------------------------------[ pom ]---------------------------------------------------------- [INFO] Copying foo:bar:pom:0.0.1-SNAPSHOT to project local repository [INFO] Copying foo:bar:pom:consumer:0.0.1-SNAPSHOT to project local repository [INFO] -------------------------------------------------------------------------------------------------------------------------- [INFO] BUILD SUCCESS [INFO] -------------------------------------------------------------------------------------------------------------------------- [INFO] Total time: 0.053 s [INFO] Finished at: 2025-05-07T11:01:55+02:00 [INFO] -------------------------------------------------------------------------------------------------------------------------- [INFO] Mimir session closed (RETRIEVED=0 CACHED=0) [cstamas@angeleyes bar (main)]$ {noformat} > 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)