diff --git a/core/deployment/src/main/java/io/quarkus/deployment/configuration/BuildTimeConfigurationReader.java b/core/deployment/src/main/java/io/quarkus/deployment/configuration/BuildTimeConfigurationReader.java index d5e5bf8e364c9..b160e70246a94 100644 --- a/core/deployment/src/main/java/io/quarkus/deployment/configuration/BuildTimeConfigurationReader.java +++ b/core/deployment/src/main/java/io/quarkus/deployment/configuration/BuildTimeConfigurationReader.java @@ -84,6 +84,7 @@ import io.smallrye.config.SecretKeys; import io.smallrye.config.SmallRyeConfig; import io.smallrye.config.SmallRyeConfigBuilder; +import io.smallrye.config.SmallRyeConfigBuilderCustomizer; import io.smallrye.config.SysPropConfigSource; import io.smallrye.config.common.AbstractConfigSource; @@ -1112,6 +1113,17 @@ private SmallRyeConfig getConfigForRuntimeRecording() { builder.getProfiles().add(""); builder.getSources().clear(); builder.getSourceProviders().clear(); + builder.withCustomizers(new SmallRyeConfigBuilderCustomizer() { + @Override + public void configBuilder(final SmallRyeConfigBuilder builder) { + builder.getMappingsBuilder().getMappings().clear(); + } + + @Override + public int priority() { + return Integer.MAX_VALUE; + } + }); builder.setAddDefaultSources(false) // Customizers may duplicate sources, but not much we can do about it, we need to run them .addDiscoveredCustomizers()