[MNG-8720] Fix for symlinked project directory#2289
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.
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.
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.
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