fix: ensure that direct building works (#44042)

also cleaning up a couple of javadocs

closes: #44031

Signed-off-by: Steve Hawkins <shawkins@redhat.com>
This commit is contained in:
Steven Hawkins 2025-11-11 10:32:44 -05:00 committed by GitHub
parent ed9d6cc40a
commit 6be362de95
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 16 additions and 3 deletions

View File

@ -565,6 +565,7 @@ public class Picocli {
if (value.getValue() == null || value.getConfigSourceName() == null
|| (quarkus && !value.getConfigSourceName().contains(QuarkusPropertiesConfigSource.NAME))) {
// only persist build options resolved from config sources and not default values
// instead we'll persist the profile (if set) because that may influence the defaults
return;
}
// since we're persisting all quarkus values, this may leak some runtime information - we don't want
@ -589,8 +590,10 @@ public class Picocli {
}
String profile = org.keycloak.common.util.Environment.getProfile();
properties.put(org.keycloak.common.util.Environment.PROFILE, profile);
properties.put(LaunchMode.current().getProfileKey(), profile);
if (profile != null) {
properties.put(org.keycloak.common.util.Environment.PROFILE, profile);
properties.put(LaunchMode.current().getProfileKey(), profile);
}
return properties;
}

View File

@ -311,7 +311,7 @@ public class PropertyMapper<T> {
return configValue;
}
// by unsetting the name this will not be seen as directly modified by the user
// by unsetting the configsource name this will not be seen as directly modified by the user
return configValue.from().withName(name).withValue(mappedValue).withRawValue(value).withConfigSourceName(null).build();
}

View File

@ -110,4 +110,14 @@ class BuildCommandDistTest {
void logLevelExpressionWithDefault(CLIResult cliResult) {
cliResult.assertBuild();
}
/**
* Documented as a workaround when a provider jar conflicts with built-in classes
*/
@Test
@RawDistOnly(reason = "Containers are immutable")
@Launch({"-Dquarkus.launch.rebuild=true"})
void forceRebuild(CLIResult cliResult) {
cliResult.getOutput().contains("Quarkus augmentation completed");
}
}