Pankraz76 commented on code in PR #2304: URL: https://github.com/apache/maven/pull/2304#discussion_r2081466671
########## impl/maven-impl/src/main/java/org/apache/maven/impl/model/DefaultModelProcessor.java: ########## @@ -94,50 +97,45 @@ public Path locateExistingPom(Path projectDirectory) { return pom; } + private Path doLocateExistingPom(Path project) { + if (project == null) { + project = Paths.get(System.getProperty("user.dir")); + } else if (Files.isDirectory(project)) { + Path pom = project.resolve("pom.xml"); + return Files.isRegularFile(pom) ? pom : null; + } + return project; + } + @Override public Model read(XmlReaderRequest request) throws IOException { - Objects.requireNonNull(request, "source cannot be null"); - Path pomFile = request.getPath(); + Path pomFile = requireNonNull(request, "source cannot be null").getPath(); Review Comment: ty -- 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-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org