quarkus-next: Replace deprecated QUARKUS_PROFILE_PROP constant (#29439)

Closes: #29438

Signed-off-by: Peter Zaoral <pzaoral@redhat.com>
This commit is contained in:
Peter Zaoral 2024-05-13 08:47:38 +02:00 committed by GitHub
parent 67a7e23c6b
commit 3ec51d1c4d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 4 deletions

View file

@ -43,8 +43,8 @@ import io.quarkus.hibernate.orm.deployment.PersistenceXmlDescriptorBuildItem;
import io.quarkus.hibernate.orm.deployment.integration.HibernateOrmIntegrationRuntimeConfiguredBuildItem;
import io.quarkus.hibernate.orm.deployment.spi.AdditionalJpaModelBuildItem;
import io.quarkus.resteasy.reactive.server.spi.MethodScannerBuildItem;
import io.quarkus.runtime.LaunchMode;
import io.quarkus.runtime.configuration.ConfigurationException;
import io.quarkus.runtime.configuration.ProfileManager;
import io.quarkus.vertx.http.deployment.NonApplicationRootPathBuildItem;
import io.quarkus.vertx.http.deployment.RouteBuildItem;
import io.smallrye.config.ConfigValue;
@ -545,7 +545,7 @@ class KeycloakProcessor {
if (profile != null) {
properties.put(Environment.PROFILE, profile);
properties.put(ProfileManager.QUARKUS_PROFILE_PROP, profile);
properties.put(LaunchMode.current().getProfileKey(), profile);
}
properties.put(QUARKUS_PROPERTY_ENABLED, String.valueOf(QuarkusPropertiesConfigSource.getConfigurationFile() != null));

View file

@ -31,7 +31,6 @@ import java.util.function.Function;
import java.util.stream.Collectors;
import io.quarkus.runtime.LaunchMode;
import io.quarkus.runtime.configuration.ProfileManager;
import io.smallrye.config.SmallRyeConfig;
import org.apache.commons.lang3.SystemUtils;
@ -116,7 +115,7 @@ public final class Environment {
public static void setProfile(String profile) {
System.setProperty(PROFILE, profile);
System.setProperty(ProfileManager.QUARKUS_PROFILE_PROP, profile);
System.setProperty(LaunchMode.current().getProfileKey(), profile);
System.setProperty(SmallRyeConfig.SMALLRYE_CONFIG_PROFILE, profile);
if (isTestLaunchMode()) {
System.setProperty("mp.config.profile", profile);