From 7b1f86c4fbea88a79a1e4d388f005b4166f04640 Mon Sep 17 00:00:00 2001 From: Jean-Francois Denise Date: Tue, 26 Nov 2024 17:04:35 +0100 Subject: [PATCH] Fix feature-pack included packages being lost during config rebuild --- core/src/main/java/org/wildfly/glow/GlowSession.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/org/wildfly/glow/GlowSession.java b/core/src/main/java/org/wildfly/glow/GlowSession.java index d13e8b0..255535a 100644 --- a/core/src/main/java/org/wildfly/glow/GlowSession.java +++ b/core/src/main/java/org/wildfly/glow/GlowSession.java @@ -35,6 +35,7 @@ import java.nio.file.Path; import java.nio.file.Paths; import java.util.ArrayList; +import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; @@ -219,7 +220,12 @@ public ScanResults scan() throws Exception { artifact.setExtension("zip"); resolver.resolve(artifact); FeaturePackLocation loc = dep.getLocation().replaceBuild(artifact.getVersion()); - outputConfigBuilder.addFeaturePackDep(loc); + GalleonFeaturePackConfig c = GalleonFeaturePackConfig.builder(loc). + setInheritConfigs(dep.getInheritConfigs() == null ? Boolean.FALSE : dep.getInheritConfigs()). + setInheritPackages(dep.getInheritPackages() == null ? Boolean.FALSE : dep.getInheritPackages()). + excludeAllPackages(dep.getExcludedPackages() == null ? Collections.emptySet() : dep.getExcludedPackages()). + includeAllPackages(dep.getIncludedPackages() == null ? Collections.emptySet() : dep.getIncludedPackages()).build(); + outputConfigBuilder.addFeaturePackDep(c); fpVersions.put(fpid.getProducer(), loc.getFPID()); originalVersions.put(fpid.getProducer(), fpid); }