-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[MNG-8720] Fix for symlinked project directory #2289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Applied proposed fix and a bit more. --- https://issues.apache.org/jira/browse/MNG-8720
return Optional.empty(); | ||
} | ||
|
||
protected Path getCanonicalPath(Path path) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the third "incarnation" of this method 😄 so we may want to do something about it?
logger.warn("Project root directory and multiModuleProjectDirectory are not aligned"); | ||
} | ||
} catch (IOException e) { | ||
throw new UncheckedIOException("findMandatoryRoot failed", e); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
findRoot
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is findMandatoryRoot method, so I don't get it why?
logger.warn("Project root directory and multiModuleProjectDirectory are not aligned"); | ||
} | ||
} catch (IOException e) { | ||
throw new UncheckedIOException("findMandatoryRoot failed", e); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UncheckedIOException is the wrong exception type here. Possibly this should return null or throw some Maven specific checked exception. Previously it threw IllegalStateException which is not really right either, but might be OK if this really "can't" happen.
While these changes are kinda okay, I have hard to time reproduce MNG-8720. So am currently lost with reproducer, will merge once I figure how to reproduce. Asked user as well on issue for one. This is only so far I got, but this PR does not fix this issue: https://gist.github.com/cstamas/3d88200e36fb60a89ba102a49ff122da |
|
Resolve #9578 |
Applied proposed fix and a bit more.
https://issues.apache.org/jira/browse/MNG-8720