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

View File

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