KEYCLOAK-15635 Remove quarkus.index-dependency properties from application.properties

This commit is contained in:
mposolda 2020-09-21 14:24:22 +02:00 committed by Pedro Igor
parent bca73fd04a
commit f0a8e78636
3 changed files with 16 additions and 6 deletions

View file

@ -29,10 +29,12 @@ import java.util.ServiceLoader;
import io.quarkus.deployment.IsDevelopment;
import io.quarkus.deployment.builditem.HotDeploymentWatchedFileBuildItem;
import io.quarkus.deployment.builditem.IndexDependencyBuildItem;
import io.quarkus.hibernate.orm.deployment.HibernateOrmConfig;
import org.hibernate.cfg.AvailableSettings;
import org.hibernate.jpa.boot.spi.PersistenceUnitDescriptor;
import org.jboss.logging.Logger;
import org.jboss.resteasy.spi.ResteasyDeployment;
import org.keycloak.Config;
import org.keycloak.common.Profile;
import org.keycloak.config.ConfigProviderFactory;
@ -159,6 +161,19 @@ class KeycloakProcessor {
return "kc.home.dir".equals(name) || "kc.config.args".equals(name);
}
/**
* This will cause quarkus tu include specified modules in the jandex index. For example keycloak-services is needed as it includes
* most of the JAX-RS resources, which are required to register Resteasy builtin providers. See {@link ResteasyDeployment#isRegisterBuiltin()}.
* Similar reason is liquibase
*
* @param indexDependencyBuildItemBuildProducer
*/
@BuildStep
void index(BuildProducer<IndexDependencyBuildItem> indexDependencyBuildItemBuildProducer) {
indexDependencyBuildItemBuildProducer.produce(new IndexDependencyBuildItem("org.liquibase", "liquibase-core"));
indexDependencyBuildItemBuildProducer.produce(new IndexDependencyBuildItem("org.keycloak", "keycloak-services"));
}
@BuildStep
void initializeRouter(BuildProducer<FilterBuildItem> routes) {
routes.produce(new FilterBuildItem(new QuarkusRequestFilter(), FilterBuildItem.AUTHORIZATION - 10));

View file

@ -29,7 +29,6 @@ import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.NoSuchFileException;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
@ -128,7 +127,7 @@ public abstract class KeycloakPropertiesConfigSource extends PropertiesConfigSou
/**
* We need a better namespace resolution so that we don't need to add Quarkus extensions manually. Maybe the easiest
* path is to just have the "keycloak" namespace for Keycloak-specific properties.
* path is to just have the "kc" namespace for Keycloak-specific properties.
*
* @param key the key to transform
* @return the same key but prefixed with the namespace

View file

@ -9,7 +9,3 @@ quarkus.http.root-path=/auth
quarkus.application.name=Keycloak
quarkus.banner.enabled=false
quarkus.index-dependency.kc-services-idx.group-id=org.keycloak
quarkus.index-dependency.kc-services-idx.artifact-id=keycloak-services
quarkus.index-dependency.liquibase-idx.group-id=org.liquibase
quarkus.index-dependency.liquibase-idx.artifact-id=liquibase-core