From 0781f3b33d0c4ea651114b80c712d327fd4e2a77 Mon Sep 17 00:00:00 2001 From: sebastienblanc Date: Fri, 14 Apr 2017 10:06:13 +0200 Subject: [PATCH] add shading add new module containing adapters remove conditional bean move bundle module --- adapters/oidc/pom.xml | 1 + .../oidc/spring-boot-container-bundle/pom.xml | 61 ++++++++++++++ adapters/oidc/spring-boot/pom.xml | 71 +++++++--------- ...on.java => KeycloakAutoConfiguration.java} | 3 +- .../main/resources/META-INF/spring.factories | 2 +- adapters/oidc/spring-security/pom.xml | 2 + boms/adapter/pom.xml | 83 ++++++++++--------- .../pom.xml | 9 +- 8 files changed, 146 insertions(+), 86 deletions(-) create mode 100644 adapters/oidc/spring-boot-container-bundle/pom.xml rename adapters/oidc/spring-boot/src/main/java/org/keycloak/adapters/springboot/{KeycloakSpringBootConfiguration.java => KeycloakAutoConfiguration.java} (99%) diff --git a/adapters/oidc/pom.xml b/adapters/oidc/pom.xml index ef9e79edcb..bc734c357e 100755 --- a/adapters/oidc/pom.xml +++ b/adapters/oidc/pom.xml @@ -41,6 +41,7 @@ servlet-filter servlet-oauth-client spring-boot + spring-boot-container-bundle spring-security tomcat undertow diff --git a/adapters/oidc/spring-boot-container-bundle/pom.xml b/adapters/oidc/spring-boot-container-bundle/pom.xml new file mode 100644 index 0000000000..2da582dd1d --- /dev/null +++ b/adapters/oidc/spring-boot-container-bundle/pom.xml @@ -0,0 +1,61 @@ + + + 4.0.0 + + keycloak-parent + org.keycloak + 3.1.0.CR1-SNAPSHOT + ../../../pom.xml + + spring-boot-container-bundle + jar + + + org.keycloak + keycloak-tomcat8-adapter + compile + + + org.keycloak + keycloak-undertow-adapter + compile + + + org.keycloak + keycloak-jetty93-adapter + compile + + + + + + org.apache.maven.plugins + maven-shade-plugin + 2.4.3 + + + package + + shade + + + + + org.keycloak:keycloak-tomcat8-adapter + org.keycloak:keycloak-undertow-adapter + org.keycloak:keycloak-jetty93-adapter + org.keycloak:keycloak-tomcat-core-adapter + org.keycloak:keycloak-tomcat-adapter-spi + org.keycloak:keycloak-undertow-adapter + org.keycloak:keycloak-undertow-adapter-spi + org.keycloak:keycloak-jetty-core + org.keycloak:keycloak-jetty-adapter-spi + + + + + + + + + diff --git a/adapters/oidc/spring-boot/pom.xml b/adapters/oidc/spring-boot/pom.xml index 48a2809b6e..5654e1a12d 100755 --- a/adapters/oidc/spring-boot/pom.xml +++ b/adapters/oidc/spring-boot/pom.xml @@ -43,75 +43,61 @@ org.keycloak keycloak-core + + org.keycloak + spring-boot-container-bundle + ${project.version} + true + compile + + + org.keycloak + keycloak-spring-security-adapter + ${project.version} + compile - - org.keycloak - keycloak-tomcat8-adapter - provided - - org.keycloak - keycloak-undertow-adapter - provided - - - org.keycloak - keycloak-jetty93-adapter - provided - - org.springframework.boot spring-boot-starter-web ${spring-boot.version} - provided + compile + true + + + io.undertow + undertow-servlet + compile + true - org.eclipse.jetty jetty-server ${jetty9.version} - provided + compile + true org.eclipse.jetty jetty-security ${jetty9.version} - provided + compile + true org.eclipse.jetty jetty-webapp ${jetty9.version} - provided + compile + true - - - io.undertow - undertow-servlet - provided - - - - io.undertow - undertow-core - provided - - - - org.keycloak - keycloak-undertow-adapter-spi - provided - - junit junit test - org.springframework.boot spring-boot-configuration-processor @@ -125,11 +111,10 @@ org.apache.maven.plugins maven-compiler-plugin - 1.6 - 1.6 + 1.7 + 1.7 - diff --git a/adapters/oidc/spring-boot/src/main/java/org/keycloak/adapters/springboot/KeycloakSpringBootConfiguration.java b/adapters/oidc/spring-boot/src/main/java/org/keycloak/adapters/springboot/KeycloakAutoConfiguration.java similarity index 99% rename from adapters/oidc/spring-boot/src/main/java/org/keycloak/adapters/springboot/KeycloakSpringBootConfiguration.java rename to adapters/oidc/spring-boot/src/main/java/org/keycloak/adapters/springboot/KeycloakAutoConfiguration.java index 657f8e3a03..986cf9a1bc 100755 --- a/adapters/oidc/spring-boot/src/main/java/org/keycloak/adapters/springboot/KeycloakSpringBootConfiguration.java +++ b/adapters/oidc/spring-boot/src/main/java/org/keycloak/adapters/springboot/KeycloakAutoConfiguration.java @@ -60,7 +60,7 @@ import java.util.Set; @Configuration @ConditionalOnWebApplication @EnableConfigurationProperties(KeycloakSpringBootProperties.class) -public class KeycloakSpringBootConfiguration { +public class KeycloakAutoConfiguration { private KeycloakSpringBootProperties keycloakProperties; @@ -70,6 +70,7 @@ public class KeycloakSpringBootConfiguration { KeycloakSpringBootConfigResolver.setAdapterConfig(keycloakProperties); } + @Bean public EmbeddedServletContainerCustomizer getKeycloakContainerCustomizer() { return new EmbeddedServletContainerCustomizer() { diff --git a/adapters/oidc/spring-boot/src/main/resources/META-INF/spring.factories b/adapters/oidc/spring-boot/src/main/resources/META-INF/spring.factories index 3193ee68ca..0c80e3bd8b 100644 --- a/adapters/oidc/spring-boot/src/main/resources/META-INF/spring.factories +++ b/adapters/oidc/spring-boot/src/main/resources/META-INF/spring.factories @@ -1,2 +1,2 @@ org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ -org.keycloak.adapters.springboot.KeycloakSpringBootConfiguration \ No newline at end of file +org.keycloak.adapters.springboot.KeycloakAutoConfiguration \ No newline at end of file diff --git a/adapters/oidc/spring-security/pom.xml b/adapters/oidc/spring-security/pom.xml index da15426bc3..df23e02695 100755 --- a/adapters/oidc/spring-security/pom.xml +++ b/adapters/oidc/spring-security/pom.xml @@ -59,12 +59,14 @@ org.springframework.security spring-security-config ${spring-security.version} + true compile org.springframework.security spring-security-web ${spring-security.version} + true compile diff --git a/boms/adapter/pom.xml b/boms/adapter/pom.xml index 24a844e05a..7bcefc6ce5 100644 --- a/boms/adapter/pom.xml +++ b/boms/adapter/pom.xml @@ -1,21 +1,21 @@ +~ Copyright 2016 Red Hat, Inc. and/or its affiliates +~ and other contributors as indicated by the @author tags. +~ +~ Licensed under the Apache License, Version 2.0 (the "License"); +~ you may not use this file except in compliance with the License. +~ You may obtain a copy of the License at +~ +~ http://www.apache.org/licenses/LICENSE-2.0 +~ +~ Unless required by applicable law or agreed to in writing, software +~ distributed under the License is distributed on an "AS IS" BASIS, +~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +~ See the License for the specific language governing permissions and +~ limitations under the License. +--> 4.0.0 @@ -64,15 +64,15 @@ keycloak-saml-adapter-api-public 3.1.0.CR1-SNAPSHOT - + org.keycloak keycloak-tomcat8-adapter - 3.1.0.CR1-SNAPSHOT + 3.1.0.CR1-SNAPSHOT - + org.keycloak keycloak-tomcat7-adapter - 3.1.0.CR1-SNAPSHOT + 3.1.0.CR1-SNAPSHOT org.keycloak @@ -94,31 +94,36 @@ keycloak-jetty92-adapter 3.1.0.CR1-SNAPSHOT - + org.keycloak keycloak-jetty93-adapter - 3.1.0.CR1-SNAPSHOT - - - org.keycloak - keycloak-undertow-adapter - 3.1.0.CR1-SNAPSHOT - - - org.keycloak - keycloak-spring-boot-adapter - 3.1.0.CR1-SNAPSHOT - - - org.keycloak - keycloak-spring-security-adapter - 3.1.0.CR1-SNAPSHOT + 3.1.0.CR1-SNAPSHOT - org.keycloak - keycloak-default-spring-boot-starter + org.keycloak + keycloak-undertow-adapter 3.1.0.CR1-SNAPSHOT - + + + org.keycloak + keycloak-spring-boot-adapter + 3.1.0.CR1-SNAPSHOT + + + org.keycloak + spring-boot-container-bundle + 3.1.0.CR1-SNAPSHOT + + + org.keycloak + keycloak-spring-security-adapter + 3.1.0.CR1-SNAPSHOT + + + org.keycloak + keycloak-default-spring-boot-starter + 3.1.0.CR1-SNAPSHOT + diff --git a/misc/spring-boot-starter/keycloak-default-spring-boot-starter/pom.xml b/misc/spring-boot-starter/keycloak-default-spring-boot-starter/pom.xml index 0fdb55d983..dba21e632d 100644 --- a/misc/spring-boot-starter/keycloak-default-spring-boot-starter/pom.xml +++ b/misc/spring-boot-starter/keycloak-default-spring-boot-starter/pom.xml @@ -1,3 +1,4 @@ + @@ -19,7 +20,11 @@ org.keycloak - keycloak-tomcat8-adapter + spring-boot-container-bundle + + + org.keycloak + keycloak-spring-security-adapter - + \ No newline at end of file