[MNG-8341] Fix possible deadlock in ModelBuilder (#1843)

The deadlock can happen when the root pom inherit from a parent which is a subproject, the subproject inheriting from an external parent.
This commit is contained in:
Guillaume Nodet 2024-10-25 10:29:26 +02:00 committed by GitHub
parent 2e01948c1e
commit 2f620ef9c9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -921,7 +921,7 @@ public class DefaultModelBuilder implements ModelBuilder {
if (candidateSource == null) {
candidateSource = resolveReactorModel(parent.getGroupId(), parent.getArtifactId(), parent.getVersion());
}
if (candidateSource == null) {
if (candidateSource == null && parentPath == null) {
candidateSource = request.getSource().resolve(modelProcessor::locateExistingPom, "..");
}