Skip to content

Commit 0781f3b

Browse files
add shading
add new module containing adapters remove conditional bean move bundle module
1 parent b683e43 commit 0781f3b

File tree

8 files changed

+133
-73
lines changed

8 files changed

+133
-73
lines changed

adapters/oidc/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
<module>servlet-filter</module>
4242
<module>servlet-oauth-client</module>
4343
<module>spring-boot</module>
44+
<module>spring-boot-container-bundle</module>
4445
<module>spring-security</module>
4546
<module>tomcat</module>
4647
<module>undertow</module>
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<parent>
5+
<artifactId>keycloak-parent</artifactId>
6+
<groupId>org.keycloak</groupId>
7+
<version>3.1.0.CR1-SNAPSHOT</version>
8+
<relativePath>../../../pom.xml</relativePath>
9+
</parent>
10+
<artifactId>spring-boot-container-bundle</artifactId>
11+
<packaging>jar</packaging>
12+
<dependencies>
13+
<dependency>
14+
<groupId>org.keycloak</groupId>
15+
<artifactId>keycloak-tomcat8-adapter</artifactId>
16+
<scope>compile</scope>
17+
</dependency>
18+
<dependency>
19+
<groupId>org.keycloak</groupId>
20+
<artifactId>keycloak-undertow-adapter</artifactId>
21+
<scope>compile</scope>
22+
</dependency>
23+
<dependency>
24+
<groupId>org.keycloak</groupId>
25+
<artifactId>keycloak-jetty93-adapter</artifactId>
26+
<scope>compile</scope>
27+
</dependency>
28+
</dependencies>
29+
<build>
30+
<plugins>
31+
<plugin>
32+
<groupId>org.apache.maven.plugins</groupId>
33+
<artifactId>maven-shade-plugin</artifactId>
34+
<version>2.4.3</version>
35+
<executions>
36+
<execution>
37+
<phase>package</phase>
38+
<goals>
39+
<goal>shade</goal>
40+
</goals>
41+
<configuration>
42+
<artifactSet>
43+
<includes>
44+
<include>org.keycloak:keycloak-tomcat8-adapter</include>
45+
<include>org.keycloak:keycloak-undertow-adapter</include>
46+
<include>org.keycloak:keycloak-jetty93-adapter</include>
47+
<include>org.keycloak:keycloak-tomcat-core-adapter</include>
48+
<include>org.keycloak:keycloak-tomcat-adapter-spi</include>
49+
<include>org.keycloak:keycloak-undertow-adapter</include>
50+
<include>org.keycloak:keycloak-undertow-adapter-spi</include>
51+
<include>org.keycloak:keycloak-jetty-core</include>
52+
<include>org.keycloak:keycloak-jetty-adapter-spi</include>
53+
</includes>
54+
</artifactSet>
55+
</configuration>
56+
</execution>
57+
</executions>
58+
</plugin>
59+
</plugins>
60+
</build>
61+
</project>

adapters/oidc/spring-boot/pom.xml

Lines changed: 24 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -43,75 +43,61 @@
4343
<groupId>org.keycloak</groupId>
4444
<artifactId>keycloak-core</artifactId>
4545
</dependency>
46-
47-
<dependency>
48-
<groupId>org.keycloak</groupId>
49-
<artifactId>keycloak-tomcat8-adapter</artifactId>
50-
<scope>provided</scope>
51-
</dependency>
5246
<dependency>
5347
<groupId>org.keycloak</groupId>
54-
<artifactId>keycloak-undertow-adapter</artifactId>
55-
<scope>provided</scope>
48+
<artifactId>spring-boot-container-bundle</artifactId>
49+
<version>${project.version}</version>
50+
<optional>true</optional>
51+
<scope>compile</scope>
5652
</dependency>
5753
<dependency>
5854
<groupId>org.keycloak</groupId>
59-
<artifactId>keycloak-jetty93-adapter</artifactId>
60-
<scope>provided</scope>
61-
</dependency>
55+
<artifactId>keycloak-spring-security-adapter</artifactId>
56+
<version>${project.version}</version>
57+
<scope>compile</scope>
6258

59+
</dependency>
6360
<dependency>
6461
<groupId>org.springframework.boot</groupId>
6562
<artifactId>spring-boot-starter-web</artifactId>
6663
<version>${spring-boot.version}</version>
67-
<scope>provided</scope>
64+
<scope>compile</scope>
65+
<optional>true</optional>
66+
</dependency>
67+
<dependency>
68+
<groupId>io.undertow</groupId>
69+
<artifactId>undertow-servlet</artifactId>
70+
<scope>compile</scope>
71+
<optional>true</optional>
6872
</dependency>
69-
7073
<dependency>
7174
<groupId>org.eclipse.jetty</groupId>
7275
<artifactId>jetty-server</artifactId>
7376
<version>${jetty9.version}</version>
74-
<scope>provided</scope>
77+
<scope>compile</scope>
78+
<optional>true</optional>
7579
</dependency>
7680

7781
<dependency>
7882
<groupId>org.eclipse.jetty</groupId>
7983
<artifactId>jetty-security</artifactId>
8084
<version>${jetty9.version}</version>
81-
<scope>provided</scope>
85+
<scope>compile</scope>
86+
<optional>true</optional>
8287
</dependency>
8388

8489
<dependency>
8590
<groupId>org.eclipse.jetty</groupId>
8691
<artifactId>jetty-webapp</artifactId>
8792
<version>${jetty9.version}</version>
88-
<scope>provided</scope>
89-
</dependency>
90-
91-
<dependency>
92-
<groupId>io.undertow</groupId>
93-
<artifactId>undertow-servlet</artifactId>
94-
<scope>provided</scope>
93+
<scope>compile</scope>
94+
<optional>true</optional>
9595
</dependency>
96-
97-
<dependency>
98-
<groupId>io.undertow</groupId>
99-
<artifactId>undertow-core</artifactId>
100-
<scope>provided</scope>
101-
</dependency>
102-
103-
<dependency>
104-
<groupId>org.keycloak</groupId>
105-
<artifactId>keycloak-undertow-adapter-spi</artifactId>
106-
<scope>provided</scope>
107-
</dependency>
108-
10996
<dependency>
11097
<groupId>junit</groupId>
11198
<artifactId>junit</artifactId>
11299
<scope>test</scope>
113100
</dependency>
114-
115101
<dependency>
116102
<groupId>org.springframework.boot</groupId>
117103
<artifactId>spring-boot-configuration-processor</artifactId>
@@ -125,11 +111,10 @@
125111
<groupId>org.apache.maven.plugins</groupId>
126112
<artifactId>maven-compiler-plugin</artifactId>
127113
<configuration>
128-
<source>1.6</source>
129-
<target>1.6</target>
114+
<source>1.7</source>
115+
<target>1.7</target>
130116
</configuration>
131117
</plugin>
132118
</plugins>
133119
</build>
134-
135120
</project>

adapters/oidc/spring-boot/src/main/java/org/keycloak/adapters/springboot/KeycloakSpringBootConfiguration.java renamed to adapters/oidc/spring-boot/src/main/java/org/keycloak/adapters/springboot/KeycloakAutoConfiguration.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
@Configuration
6161
@ConditionalOnWebApplication
6262
@EnableConfigurationProperties(KeycloakSpringBootProperties.class)
63-
public class KeycloakSpringBootConfiguration {
63+
public class KeycloakAutoConfiguration {
6464

6565
private KeycloakSpringBootProperties keycloakProperties;
6666

@@ -70,6 +70,7 @@ public void setKeycloakSpringBootProperties(KeycloakSpringBootProperties keycloa
7070
KeycloakSpringBootConfigResolver.setAdapterConfig(keycloakProperties);
7171
}
7272

73+
7374
@Bean
7475
public EmbeddedServletContainerCustomizer getKeycloakContainerCustomizer() {
7576
return new EmbeddedServletContainerCustomizer() {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
2-
org.keycloak.adapters.springboot.KeycloakSpringBootConfiguration
2+
org.keycloak.adapters.springboot.KeycloakAutoConfiguration

adapters/oidc/spring-security/pom.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,14 @@
5959
<groupId>org.springframework.security</groupId>
6060
<artifactId>spring-security-config</artifactId>
6161
<version>${spring-security.version}</version>
62+
<optional>true</optional>
6263
<scope>compile</scope>
6364
</dependency>
6465
<dependency>
6566
<groupId>org.springframework.security</groupId>
6667
<artifactId>spring-security-web</artifactId>
6768
<version>${spring-security.version}</version>
69+
<optional>true</optional>
6870
<scope>compile</scope>
6971
</dependency>
7072
<dependency>

boms/adapter/pom.xml

Lines changed: 35 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22

33
<!--
4-
~ Copyright 2016 Red Hat, Inc. and/or its affiliates
5-
~ and other contributors as indicated by the @author tags.
6-
~
7-
~ Licensed under the Apache License, Version 2.0 (the "License");
8-
~ you may not use this file except in compliance with the License.
9-
~ You may obtain a copy of the License at
10-
~
11-
~ http://www.apache.org/licenses/LICENSE-2.0
12-
~
13-
~ Unless required by applicable law or agreed to in writing, software
14-
~ distributed under the License is distributed on an "AS IS" BASIS,
15-
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16-
~ See the License for the specific language governing permissions and
17-
~ limitations under the License.
18-
-->
4+
~ Copyright 2016 Red Hat, Inc. and/or its affiliates
5+
~ and other contributors as indicated by the @author tags.
6+
~
7+
~ Licensed under the Apache License, Version 2.0 (the "License");
8+
~ you may not use this file except in compliance with the License.
9+
~ You may obtain a copy of the License at
10+
~
11+
~ http://www.apache.org/licenses/LICENSE-2.0
12+
~
13+
~ Unless required by applicable law or agreed to in writing, software
14+
~ distributed under the License is distributed on an "AS IS" BASIS,
15+
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
~ See the License for the specific language governing permissions and
17+
~ limitations under the License.
18+
-->
1919
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
2020
<modelVersion>4.0.0</modelVersion>
2121

@@ -64,15 +64,15 @@
6464
<artifactId>keycloak-saml-adapter-api-public</artifactId>
6565
<version>3.1.0.CR1-SNAPSHOT</version>
6666
</dependency>
67-
<dependency>
67+
<dependency>
6868
<groupId>org.keycloak</groupId>
6969
<artifactId>keycloak-tomcat8-adapter</artifactId>
70-
<version>3.1.0.CR1-SNAPSHOT</version>
70+
<version>3.1.0.CR1-SNAPSHOT</version>
7171
</dependency>
72-
<dependency>
72+
<dependency>
7373
<groupId>org.keycloak</groupId>
7474
<artifactId>keycloak-tomcat7-adapter</artifactId>
75-
<version>3.1.0.CR1-SNAPSHOT</version>
75+
<version>3.1.0.CR1-SNAPSHOT</version>
7676
</dependency>
7777
<dependency>
7878
<groupId>org.keycloak</groupId>
@@ -94,31 +94,36 @@
9494
<artifactId>keycloak-jetty92-adapter</artifactId>
9595
<version>3.1.0.CR1-SNAPSHOT</version>
9696
</dependency>
97-
<dependency>
97+
<dependency>
9898
<groupId>org.keycloak</groupId>
9999
<artifactId>keycloak-jetty93-adapter</artifactId>
100-
<version>3.1.0.CR1-SNAPSHOT</version>
100+
<version>3.1.0.CR1-SNAPSHOT</version>
101101
</dependency>
102-
<dependency>
102+
<dependency>
103103
<groupId>org.keycloak</groupId>
104104
<artifactId>keycloak-undertow-adapter</artifactId>
105-
<version>3.1.0.CR1-SNAPSHOT</version>
105+
<version>3.1.0.CR1-SNAPSHOT</version>
106106
</dependency>
107-
<dependency>
107+
<dependency>
108108
<groupId>org.keycloak</groupId>
109109
<artifactId>keycloak-spring-boot-adapter</artifactId>
110-
<version>3.1.0.CR1-SNAPSHOT</version>
110+
<version>3.1.0.CR1-SNAPSHOT</version>
111111
</dependency>
112-
<dependency>
112+
<dependency>
113+
<groupId>org.keycloak</groupId>
114+
<artifactId>spring-boot-container-bundle</artifactId>
115+
<version>3.1.0.CR1-SNAPSHOT</version>
116+
</dependency>
117+
<dependency>
113118
<groupId>org.keycloak</groupId>
114119
<artifactId>keycloak-spring-security-adapter</artifactId>
115-
<version>3.1.0.CR1-SNAPSHOT</version>
120+
<version>3.1.0.CR1-SNAPSHOT</version>
116121
</dependency>
117122
<dependency>
118-
<groupId>org.keycloak</groupId>
119-
<artifactId>keycloak-default-spring-boot-starter</artifactId>
123+
<groupId>org.keycloak</groupId>
124+
<artifactId>keycloak-default-spring-boot-starter</artifactId>
120125
<version>3.1.0.CR1-SNAPSHOT</version>
121-
</dependency>
126+
</dependency>
122127
</dependencies>
123128
</dependencyManagement>
124129

misc/spring-boot-starter/keycloak-default-spring-boot-starter/pom.xml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
<?xml version="1.0" encoding="UTF-8"?>
23

34
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
@@ -19,7 +20,11 @@
1920
</dependency>
2021
<dependency>
2122
<groupId>org.keycloak</groupId>
22-
<artifactId>keycloak-tomcat8-adapter</artifactId>
23+
<artifactId>spring-boot-container-bundle</artifactId>
24+
</dependency>
25+
<dependency>
26+
<groupId>org.keycloak</groupId>
27+
<artifactId>keycloak-spring-security-adapter</artifactId>
2328
</dependency>
2429
</dependencies>
25-
</project>
30+
</project>

0 commit comments

Comments
 (0)