fix: ensure that direct building works (#44042) (#44134)

also cleaning up a couple of javadocs

closes: #44031


(cherry picked from commit 6be362de9555ed8ce5341ada2d80d989fee56850)

Signed-off-by: Steve Hawkins <shawkins@redhat.com>
This commit is contained in:
Steven Hawkins 2025-11-12 07:29:24 -05:00 committed by GitHub
parent 670ddaa7cc
commit fd4059b7fb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 16 additions and 3 deletions

View File

@ -555,6 +555,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
@ -579,8 +580,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

@ -303,7 +303,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");
}
}