Use model processor when locating the root pom when using -f/--file

This commit is contained in:
Guillaume Nodet 2023-06-30 15:30:38 +02:00
parent 567df8dea8
commit 6b3989ce5b
1 changed files with 5 additions and 1 deletions

View File

@ -1352,7 +1352,11 @@ public class MavenCli {
if (alternatePomFile != null) {
File pom = resolveFile(new File(alternatePomFile), workingDirectory);
if (pom.isDirectory()) {
pom = new File(pom, "pom.xml");
if (modelProcessor != null) {
pom = modelProcessor.locatePom(pom);
} else {
pom = new File(pom, "pom.xml");
}
}
return pom;