diff --git a/maven-api-impl/src/main/java/org/apache/maven/internal/impl/model/DefaultModelBuilder.java b/maven-api-impl/src/main/java/org/apache/maven/internal/impl/model/DefaultModelBuilder.java index 9a13ca96279f..a8f6f5f511d6 100644 --- a/maven-api-impl/src/main/java/org/apache/maven/internal/impl/model/DefaultModelBuilder.java +++ b/maven-api-impl/src/main/java/org/apache/maven/internal/impl/model/DefaultModelBuilder.java @@ -1132,12 +1132,13 @@ private Model readEffectiveModel() throws ModelBuilderException { throw newModelBuilderException(); } - inputModel = activateFileModel(inputModel); - setRootModel(inputModel); + Model activatedFileModel = activateFileModel(inputModel); + // profile activation - DefaultProfileActivationContext profileActivationContext = getProfileActivationContext(request, inputModel); + DefaultProfileActivationContext profileActivationContext = + getProfileActivationContext(request, activatedFileModel); List activeExternalProfiles = result.getActiveExternalProfiles();