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 fd33610c90ca0..326fd9c0b924a 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
@@ -1013,8 +1013,8 @@ private Converter> getConverter(SmallRyeConfig config, Field field, ConverterT
* properties in all profiles (active or not), so it is safe to fall back to different default on another
* profile.
*
- * We also filter the properties coming from System or Env with the registered roots, because we don't want to
- * record properties set by the compiling JVM (or other properties that are only related to the build).
+ * We also filter the properties coming from System, Env or Build with the registered roots, because we don't
+ * want to record properties set by the compiling JVM (or other properties that are only related to the build).
*/
private Set getAllProperties(final Set registeredRoots) {
Set properties = new HashSet<>();
@@ -1023,7 +1023,8 @@ private Set getAllProperties(final Set registeredRoots) {
}
for (ConfigSource configSource : config.getConfigSources()) {
- if (configSource instanceof SysPropConfigSource || configSource instanceof EnvConfigSource) {
+ if (configSource instanceof SysPropConfigSource || configSource instanceof EnvConfigSource
+ || "PropertiesConfigSource[source=Build system]".equals(configSource.getName())) {
for (String property : configSource.getPropertyNames()) {
NameIterator ni = new NameIterator(property);
if (ni.hasNext() && PropertiesUtil.isPropertyInRoot(registeredRoots, ni)) {