Fix reactor loading problems (#1497)

This commit is contained in:
Guillaume Nodet 2024-05-03 10:48:38 +02:00 committed by GitHub
parent febfd2b5c9
commit 7451585a19
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 7 deletions

View File

@ -901,9 +901,7 @@ public class DefaultModelBuilder implements ModelBuilder {
Parent parent = childModel.getParent();
if (parent != null) {
if (request.isProjectBuild()) {
parentData = readParentLocally(childModel, childSource, request, problems);
}
parentData = readParentLocally(childModel, childSource, request, problems);
if (parentData == null) {
parentData = readParentExternally(childModel, request, problems);
}
@ -1247,7 +1245,7 @@ public class DefaultModelBuilder implements ModelBuilder {
IMPORT,
() -> doLoadDependencyManagement(
model, request, problems, dependency, groupId, artifactId, version, importIds));
DependencyManagement importMgmt = importModel.getDependencyManagement();
DependencyManagement importMgmt = importModel != null ? importModel.getDependencyManagement() : null;
if (importMgmt == null) {
importMgmt = DependencyManagement.newInstance();
}

View File

@ -193,7 +193,7 @@ class DefaultConsumerPomBuilder implements ConsumerPomBuilder {
dependencyManagementImporter,
lifecycleBindingsInjector,
pluginConfigurationExpander,
null,
profileActivationFilePathInterpolator,
modelTransformer,
versionParser);
ModelBuilderRequest.ModelBuilderRequestBuilder request = ModelBuilderRequest.builder();
@ -216,8 +216,8 @@ class DefaultConsumerPomBuilder implements ConsumerPomBuilder {
.sorted()
.distinct()
.toList();
logger.info("ModelCache contains " + paths.size());
paths.forEach(s -> logger.info(" " + s));
logger.debug("ModelCache contains " + paths.size());
paths.forEach(s -> logger.debug(" " + s));
}
return modelBuilder.build(request.build());
}