Skip to content

Commit

Permalink
Add system properties source to CodeGenerator config sources
Browse files Browse the repository at this point in the history
Resolves: quarkusio#27431
  • Loading branch information
geoand authored and fercomunello committed Aug 31, 2022
1 parent 050f08c commit ef41b1e
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -21,6 +21,7 @@
import io.quarkus.runtime.configuration.ConfigUtils;
import io.smallrye.config.PropertiesConfigSource;
import io.smallrye.config.SmallRyeConfig;
import io.smallrye.config.SysPropConfigSource;

/**
* A set of methods to initialize and execute {@link CodeGenProvider}s.
Expand Down Expand Up @@ -149,14 +150,15 @@ public static boolean trigger(ClassLoader deploymentClassLoader,
return callWithClassloader(deploymentClassLoader, () -> {

final PropertiesConfigSource pcs = new PropertiesConfigSource(properties, "Build system");
final SysPropConfigSource spcs = new SysPropConfigSource();

// Discovered Config classes may cause issues here, because this goal runs before compile
final SmallRyeConfig config = ConfigUtils.configBuilder(false, false, launchMode)
.setAddDiscoveredSources(false)
.setAddDiscoveredInterceptors(false)
.setAddDiscoveredConverters(false)
.withProfile(launchMode.getDefaultProfile())
.withSources(pcs)
.withSources(pcs, spcs)
.build();

CodeGenProvider provider = data.provider;
Expand Down

0 comments on commit ef41b1e

Please sign in to comment.