You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "arturobernalg (via GitHub)" <gi...@apache.org> on 2026/10/15 07:44:05 UTC
Re: [PR] Resolve the parent POM of a source against the directory of its POM [maven]
arturobernalg commented on PR #13538:
URL: https://github.com/apache/maven/pull/13538#issuecomment-6187123830
Yes, I have fixed the behavior, as you suggest. `SourceWrapper.getRelatedSource()` now resolves against the directory which contains the file when `source.getPath()` is not null, and returns null when it is null, as there is nothing to resolve against. It also accepts both kinds of slashes, a directory designates its `pom.xml`, and a missing or unreadable POM gives null, like `FileModelSource`. The contract of `Source.resolve(String)` is unchanged for directory sources. The new `DefaultProjectBuilderSourceWrapperTest` fails with the previous behavior (4 of 5 tests, among them the parent which was the same POM), and I updated the title and the description of the PR.
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org