We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d85f59f commit fcf7337Copy full SHA for fcf7337
maven-api-impl/src/main/java/org/apache/maven/internal/impl/model/DefaultModelBuilder.java
@@ -1185,6 +1185,9 @@ Model doReadFileModel() throws ModelBuilderException {
1185
rootDirectory = request.getSession().getRootDirectory();
1186
} catch (IllegalStateException ignore) {
1187
rootDirectory = modelSource.getPath();
1188
+ while (rootDirectory != null && !Files.isDirectory(rootDirectory)) {
1189
+ rootDirectory = rootDirectory.getParent();
1190
+ }
1191
}
1192
try (InputStream is = modelSource.openStream()) {
1193
model = modelProcessor.read(XmlReaderRequest.builder()
0 commit comments