gnodet-bot commented on code in PR #13650:
URL: https://github.com/apache/maven/pull/13650#discussion_r4324535925
##########
compat/maven-embedder/src/test/java/org/apache/maven/cli/MavenCliTest.java:
##########
@@ -225,6 +227,29 @@ void testMavenConfigInvalid() throws Exception {
assertThrows(ParseException.class, () -> cli.cli(request));
}
+ /**
+ * MNG-11167: {@code multiModuleProjectDirectory} must keep the path as
given, not the path that
+ * {@link File#getCanonicalFile()} resolves a symlinked (or, on Windows, a
mapped network drive)
+ * segment to, or every module/parent path resolved relative to it
inherits the wrong base.
+ */
+ @Test
+ void testMultiModuleProjectDirectoryIsNotResolvedThroughASymlink(@TempDir
Path tempDir) throws Exception {
+ Path real = Files.createDirectories(tempDir.resolve("real"));
+ Path link = tempDir.resolve("link");
+ try {
+ Files.createSymbolicLink(link, real);
+ } catch (IOException | UnsupportedOperationException e) {
+ assumeTrue(false, "symbolic links are not supported on this
machine");
Review Comment:
💡 **Nit:** `assumeTrue(false, msg)` is a bit counterintuitive — it reads as
"assume true" but actually aborts. The more idiomatic JUnit 5 API (available
since 5.9) is `Assumptions.abort(msg)`, which makes the intent explicit:
```suggestion
Assumptions.abort("symbolic links are not supported on this
machine");
```
Minor readability nit only — the current form is functionally correct.
--
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]