[MNG-8360] Fix parent profiles not reported as activated (#1852)

This commit is contained in:
Guillaume Nodet 2024-10-25 17:34:15 +02:00 committed by GitHub
parent a44392808b
commit c0866ec067
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 1 deletions

View File

@ -1199,10 +1199,14 @@ public class DefaultModelBuilder implements ModelBuilder {
// profile injection
List<Profile> activePomProfiles = getActiveProfiles(interpolatedProfiles, profileActivationContext);
result.setActivePomProfiles(activePomProfiles);
model = profileInjector.injectProfiles(model, activePomProfiles, request, this);
model = profileInjector.injectProfiles(model, activeExternalProfiles, request, this);
List<Profile> allProfiles = new ArrayList<>(parentActivePomProfiles.size() + activePomProfiles.size());
allProfiles.addAll(parentActivePomProfiles);
allProfiles.addAll(activePomProfiles);
result.setActivePomProfiles(allProfiles);
// model interpolation
Model resultModel = model;
resultModel = interpolateModel(resultModel, request, this);