From d78c83b2365c49eb38ae0db906eba9b069ea929e Mon Sep 17 00:00:00 2001 From: Stian Thorgersen Date: Wed, 22 Jul 2015 15:13:52 +0200 Subject: [PATCH] KEYCLOAK-1588 Strange version of slf4j not available in maven central --- examples/ldap/embedded-ldap/pom.xml | 5 ----- pom.xml | 13 +----------- testsuite/integration/pom.xml | 8 ------- testsuite/proxy/pom.xml | 9 -------- testsuite/tomcat6/pom.xml | 12 ++++------- .../org/keycloak/testsuite/TomcatServer.java | 11 +++++----- testsuite/tomcat7/pom.xml | 9 -------- testsuite/tomcat8/pom.xml | 9 -------- util/embedded-ldap/pom.xml | 9 ++------ .../ldap/FileDirectoryServiceFactory.java | 21 +++++++------------ 10 files changed, 20 insertions(+), 86 deletions(-) diff --git a/examples/ldap/embedded-ldap/pom.xml b/examples/ldap/embedded-ldap/pom.xml index b981072adb..44f68e1082 100644 --- a/examples/ldap/embedded-ldap/pom.xml +++ b/examples/ldap/embedded-ldap/pom.xml @@ -19,11 +19,6 @@ org.keycloak keycloak-util-embedded-ldap - - org.slf4j - slf4j-log4j12 - compile - diff --git a/pom.xml b/pom.xml index 87a1a96926..0f746025ba 100755 --- a/pom.xml +++ b/pom.xml @@ -47,7 +47,7 @@ 9.3-1100-jdbc41 1.6.1 1.4.01 - 1.7.7.jbossorg-1 + 1.7.7 9.0.0.Final 1.0.0.Final 1.0.0.Alpha8 @@ -491,23 +491,12 @@ slf4j-api ${slf4j.version} - - org.slf4j - slf4j-simple - ${slf4j.version} - test - org.slf4j slf4j-log4j12 ${slf4j.version} test - - org.slf4j - jcl-over-slf4j - ${slf4j.version} - mysql diff --git a/testsuite/integration/pom.xml b/testsuite/integration/pom.xml index 7d02e50374..ae855387ab 100755 --- a/testsuite/integration/pom.xml +++ b/testsuite/integration/pom.xml @@ -35,14 +35,6 @@ log4j log4j - - org.slf4j - slf4j-api - - - org.slf4j - slf4j-log4j12 - org.jboss.spec.javax.servlet jboss-servlet-api_3.0_spec diff --git a/testsuite/proxy/pom.xml b/testsuite/proxy/pom.xml index e39de07aa9..69e8e92706 100755 --- a/testsuite/proxy/pom.xml +++ b/testsuite/proxy/pom.xml @@ -35,15 +35,6 @@ log4j log4j - - org.slf4j - slf4j-api - - - org.slf4j - slf4j-log4j12 - ${slf4j.version} - org.jboss.spec.javax.servlet jboss-servlet-api_3.0_spec diff --git a/testsuite/tomcat6/pom.xml b/testsuite/tomcat6/pom.xml index fe817e89b4..3fd85d40de 100755 --- a/testsuite/tomcat6/pom.xml +++ b/testsuite/tomcat6/pom.xml @@ -17,6 +17,10 @@ + + org.jboss.logging + jboss-logging + org.keycloak keycloak-dependencies-server-all @@ -30,14 +34,6 @@ log4j log4j - - org.slf4j - slf4j-api - - - org.slf4j - slf4j-log4j12 - org.jboss.spec.javax.servlet jboss-servlet-api_3.0_spec diff --git a/testsuite/tomcat6/src/test/java/org/keycloak/testsuite/TomcatServer.java b/testsuite/tomcat6/src/test/java/org/keycloak/testsuite/TomcatServer.java index 7b41a05be0..a0ebb08547 100755 --- a/testsuite/tomcat6/src/test/java/org/keycloak/testsuite/TomcatServer.java +++ b/testsuite/tomcat6/src/test/java/org/keycloak/testsuite/TomcatServer.java @@ -6,16 +6,15 @@ import org.apache.catalina.LifecycleException; import org.apache.catalina.connector.Connector; import org.apache.catalina.core.StandardContext; import org.apache.catalina.startup.Embedded; +import org.jboss.logging.Logger; import org.keycloak.adapters.tomcat.KeycloakAuthenticatorValve; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; public class TomcatServer { private Embedded server; private int port; private boolean isRunning; - private static final Logger LOG = LoggerFactory.getLogger(TomcatServer.class); + private static final Logger LOG = Logger.getLogger(TomcatServer.class); private static final boolean isInfo = LOG.isInfoEnabled(); private final Host host; @@ -71,7 +70,7 @@ public class TomcatServer { */ public void start() throws LifecycleException { if (isRunning) { - LOG.warn("Tomcat server is already running @ port={}; ignoring the start", port); + LOG.warnv("Tomcat server is already running @ port={}; ignoring the start", port); return; } @@ -85,7 +84,7 @@ public class TomcatServer { Connector connector = server.createConnector(host.getName(), port, false); server.addConnector(connector); - if (isInfo) LOG.info("Starting the Tomcat server @ port={}", port); + if (isInfo) LOG.infov("Starting the Tomcat server @ port={}", port); server.setAwait(true); server.start(); @@ -97,7 +96,7 @@ public class TomcatServer { */ public void stop() throws LifecycleException { if (!isRunning) { - LOG.warn("Tomcat server is not running @ port={}", port); + LOG.warnv("Tomcat server is not running @ port={}", port); return; } diff --git a/testsuite/tomcat7/pom.xml b/testsuite/tomcat7/pom.xml index c3bc09ea3f..5255f932e4 100755 --- a/testsuite/tomcat7/pom.xml +++ b/testsuite/tomcat7/pom.xml @@ -46,15 +46,6 @@ log4j log4j - - org.slf4j - slf4j-api - - - org.slf4j - slf4j-log4j12 - ${slf4j.version} - org.jboss.spec.javax.servlet jboss-servlet-api_3.0_spec diff --git a/testsuite/tomcat8/pom.xml b/testsuite/tomcat8/pom.xml index a7cddbd4f7..1a7ac3c919 100755 --- a/testsuite/tomcat8/pom.xml +++ b/testsuite/tomcat8/pom.xml @@ -30,15 +30,6 @@ log4j log4j - - org.slf4j - slf4j-api - - - org.slf4j - slf4j-log4j12 - ${slf4j.version} - org.jboss.spec.javax.servlet jboss-servlet-api_3.0_spec diff --git a/util/embedded-ldap/pom.xml b/util/embedded-ldap/pom.xml index 5a1e927309..6eeeece763 100644 --- a/util/embedded-ldap/pom.xml +++ b/util/embedded-ldap/pom.xml @@ -28,13 +28,8 @@ log4j - org.slf4j - slf4j-api - - - org.slf4j - slf4j-log4j12 - compile + org.jboss.logging + jboss-logging diff --git a/util/embedded-ldap/src/main/java/org/keycloak/util/ldap/FileDirectoryServiceFactory.java b/util/embedded-ldap/src/main/java/org/keycloak/util/ldap/FileDirectoryServiceFactory.java index f0153ec67c..4adb1370f5 100644 --- a/util/embedded-ldap/src/main/java/org/keycloak/util/ldap/FileDirectoryServiceFactory.java +++ b/util/embedded-ldap/src/main/java/org/keycloak/util/ldap/FileDirectoryServiceFactory.java @@ -1,16 +1,10 @@ package org.keycloak.util.ldap; -import java.io.File; -import java.io.IOException; -import java.util.List; - -import org.apache.commons.io.FileUtils; import org.apache.directory.api.ldap.model.constants.SchemaConstants; -import org.apache.directory.api.ldap.model.exception.LdapEntryAlreadyExistsException; -import org.apache.directory.api.ldap.model.exception.LdapException; import org.apache.directory.api.ldap.model.schema.LdapComparator; import org.apache.directory.api.ldap.model.schema.SchemaManager; -import org.apache.directory.api.ldap.model.schema.comparators.NormalizingComparator; +import org. + apache.directory.api.ldap.model.schema.comparators.NormalizingComparator; import org.apache.directory.api.ldap.model.schema.registries.ComparatorRegistry; import org.apache.directory.api.ldap.model.schema.registries.SchemaLoader; import org.apache.directory.api.ldap.schemaextractor.SchemaLdifExtractor; @@ -23,18 +17,19 @@ import org.apache.directory.server.core.DefaultDirectoryService; import org.apache.directory.server.core.api.CacheService; import org.apache.directory.server.core.api.DirectoryService; import org.apache.directory.server.core.api.InstanceLayout; -import org.apache.directory.server.core.api.interceptor.context.AddOperationContext; import org.apache.directory.server.core.api.partition.Partition; import org.apache.directory.server.core.api.schema.SchemaPartition; import org.apache.directory.server.core.factory.DefaultDirectoryServiceFactory; import org.apache.directory.server.core.factory.DirectoryServiceFactory; -import org.apache.directory.server.core.factory.JdbmPartitionFactory; import org.apache.directory.server.core.factory.LdifPartitionFactory; import org.apache.directory.server.core.factory.PartitionFactory; import org.apache.directory.server.core.partition.ldif.LdifPartition; import org.apache.directory.server.i18n.I18n; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import org.jboss.logging.Logger; + +import java.io.File; +import java.io.IOException; +import java.util.List; /** * Slightly modified version of {@link DefaultDirectoryServiceFactory} which allows persistence among restarts and uses LDIF partitions by default @@ -44,7 +39,7 @@ import org.slf4j.LoggerFactory; class FileDirectoryServiceFactory implements DirectoryServiceFactory { /** A logger for this class */ - private static final Logger LOG = LoggerFactory.getLogger(FileDirectoryServiceFactory.class); + private static final Logger LOG = Logger.getLogger(FileDirectoryServiceFactory.class); /** The directory service. */ private DirectoryService directoryService;