From 362babe5e22ebde4135c786b7fd72a8aaebaa3ee Mon Sep 17 00:00:00 2001 From: Stian Thorgersen Date: Mon, 18 May 2015 11:40:13 +0200 Subject: [PATCH 1/3] Fixed server-dist --- distribution/feature-packs/pom.xml | 2 +- .../server-feature-pack/assembly.xml | 14 ++++++++++ .../configuration/standalone/subsystems.xml | 18 +++---------- .../configuration}/providers/README.txt | 0 .../configuration}/themes/README.txt | 0 distribution/pom.xml | 4 +-- distribution/server-dist/assembly.xml | 26 ------------------- distribution/server-dist/pom.xml | 7 +---- distribution/server-overlay/assembly.xml | 7 ++++- distribution/server-overlay/pom.xml | 6 ++--- .../keycloak-datasources.xml | 8 ------ pom.xml | 6 +++++ 12 files changed, 36 insertions(+), 62 deletions(-) rename distribution/{server-overlay/src/main => feature-packs/server-feature-pack/src/main/resources/content/standalone/configuration}/providers/README.txt (100%) rename distribution/{server-overlay/src/main => feature-packs/server-feature-pack/src/main/resources/content/standalone/configuration}/themes/README.txt (100%) diff --git a/distribution/feature-packs/pom.xml b/distribution/feature-packs/pom.xml index dcc6c0c147..f00209595d 100644 --- a/distribution/feature-packs/pom.xml +++ b/distribution/feature-packs/pom.xml @@ -14,7 +14,7 @@ pom - adapter-feature-pack + server-feature-pack diff --git a/distribution/feature-packs/server-feature-pack/assembly.xml b/distribution/feature-packs/server-feature-pack/assembly.xml index eaee2caa59..47c914fb30 100644 --- a/distribution/feature-packs/server-feature-pack/assembly.xml +++ b/distribution/feature-packs/server-feature-pack/assembly.xml @@ -49,5 +49,19 @@ **/module.xml + + ../../../ + + License.html + + content + + + ../../../forms/common-themes/src/main/resources/theme + content/standalone/configuration/themes + + **/** + + diff --git a/distribution/feature-packs/server-feature-pack/src/main/resources/configuration/standalone/subsystems.xml b/distribution/feature-packs/server-feature-pack/src/main/resources/configuration/standalone/subsystems.xml index fad3c38b14..d20bf2e610 100644 --- a/distribution/feature-packs/server-feature-pack/src/main/resources/configuration/standalone/subsystems.xml +++ b/distribution/feature-packs/server-feature-pack/src/main/resources/configuration/standalone/subsystems.xml @@ -3,33 +3,21 @@ logging.xml - batch.xml + bean-validation.xml keycloak-datasources.xml - deployment-scanner.xml - ee.xml - ejb3.xml + ee.xml io.xml infinispan.xml jaxrs.xml jca.xml - jdr.xml - jmx.xml jpa.xml - jsf.xml - mail.xml - naming.xml - pojo.xml - remoting.xml - resource-adapters.xml + naming.xml request-controller.xml - sar.xml security-manager.xml security.xml transactions.xml undertow.xml - webservices.xml - weld.xml keycloak-server.xml diff --git a/distribution/server-overlay/src/main/providers/README.txt b/distribution/feature-packs/server-feature-pack/src/main/resources/content/standalone/configuration/providers/README.txt similarity index 100% rename from distribution/server-overlay/src/main/providers/README.txt rename to distribution/feature-packs/server-feature-pack/src/main/resources/content/standalone/configuration/providers/README.txt diff --git a/distribution/server-overlay/src/main/themes/README.txt b/distribution/feature-packs/server-feature-pack/src/main/resources/content/standalone/configuration/themes/README.txt similarity index 100% rename from distribution/server-overlay/src/main/themes/README.txt rename to distribution/feature-packs/server-feature-pack/src/main/resources/content/standalone/configuration/themes/README.txt diff --git a/distribution/pom.xml b/distribution/pom.xml index 8eeaafcf76..f2d45491f1 100755 --- a/distribution/pom.xml +++ b/distribution/pom.xml @@ -28,13 +28,13 @@ adapters - demo-dist + docs-dist examples-dist modules proxy-dist server-dist - server-overlay + src-dist subsystem-war feature-packs diff --git a/distribution/server-dist/assembly.xml b/distribution/server-dist/assembly.xml index 6f0c028bfd..6a846af31d 100755 --- a/distribution/server-dist/assembly.xml +++ b/distribution/server-dist/assembly.xml @@ -8,7 +8,6 @@ true - target/${project.build.finalName} @@ -38,30 +37,5 @@ *.* - - ../../forms/common-themes/src/main/resources/theme - standalone/configuration/themes - - **/** - - - - ../../ - - License.html - - - - - - - ../server-overlay/src/main/themes/README.txt - standalone/configuration/themes - - - ../server-overlay/src/main/providers/README.txt - standalone/configuration/providers - - diff --git a/distribution/server-dist/pom.xml b/distribution/server-dist/pom.xml index cc76727252..f5e48635a9 100755 --- a/distribution/server-dist/pom.xml +++ b/distribution/server-dist/pom.xml @@ -16,12 +16,7 @@ org.keycloak - keycloak-server-overlay - zip - - - org.wildfly - wildfly-dist + keycloak-server-feature-pack zip diff --git a/distribution/server-overlay/assembly.xml b/distribution/server-overlay/assembly.xml index 26f4d8cf42..265c256030 100755 --- a/distribution/server-overlay/assembly.xml +++ b/distribution/server-overlay/assembly.xml @@ -5,12 +5,17 @@ zip tar.gz + false ${project.build.directory}/unpacked/modules - modules/system/layers/base + modules + + + ${project.build.directory}/unpacked/content + ../../forms/common-themes/src/main/resources/theme diff --git a/distribution/server-overlay/pom.xml b/distribution/server-overlay/pom.xml index f68f678dc8..a9f16a2962 100755 --- a/distribution/server-overlay/pom.xml +++ b/distribution/server-overlay/pom.xml @@ -16,7 +16,7 @@ org.keycloak - keycloak-jboss-modules + keycloak-server-feature-pack zip @@ -61,9 +61,9 @@ org.keycloak - keycloak-jboss-modules + keycloak-server-feature-pack zip - ${project.build.directory}/unpacked/modules + ${project.build.directory}/unpacked diff --git a/integration/wildfly/wildfly-server-subsystem/src/main/resources/subsystem-templates/keycloak-datasources.xml b/integration/wildfly/wildfly-server-subsystem/src/main/resources/subsystem-templates/keycloak-datasources.xml index 9f05130294..114545f388 100644 --- a/integration/wildfly/wildfly-server-subsystem/src/main/resources/subsystem-templates/keycloak-datasources.xml +++ b/integration/wildfly/wildfly-server-subsystem/src/main/resources/subsystem-templates/keycloak-datasources.xml @@ -4,14 +4,6 @@ org.jboss.as.connector - - jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE - h2 - - sa - sa - - jdbc:h2:${jboss.server.data.dir}/keycloak;AUTO_SERVER=TRUE h2 diff --git a/pom.xml b/pom.xml index 796918a8dd..5c529c7c8c 100755 --- a/pom.xml +++ b/pom.xml @@ -1128,6 +1128,12 @@ ${project.version} war + + org.keycloak + keycloak-server-feature-pack + ${project.version} + zip + org.keycloak keycloak-testsuite-integration From 2f8d577e9570c0962287979c0f0611a4f730f147 Mon Sep 17 00:00:00 2001 From: Stian Thorgersen Date: Mon, 18 May 2015 13:44:20 +0200 Subject: [PATCH 2/3] Fix server-overlay --- distribution/server-overlay/assembly.xml | 2 +- distribution/server-overlay/pom.xml | 6 +- .../src/main/keycloak-server.json | 72 +++++++++++++++++++ .../src/main/providers/README.txt | 2 + .../server-overlay/src/main/themes/README.txt | 3 + .../src/main/xslt/standalone.xsl | 27 ++----- 6 files changed, 85 insertions(+), 27 deletions(-) create mode 100644 distribution/server-overlay/src/main/keycloak-server.json create mode 100644 distribution/server-overlay/src/main/providers/README.txt create mode 100644 distribution/server-overlay/src/main/themes/README.txt diff --git a/distribution/server-overlay/assembly.xml b/distribution/server-overlay/assembly.xml index 265c256030..f8424b1d93 100755 --- a/distribution/server-overlay/assembly.xml +++ b/distribution/server-overlay/assembly.xml @@ -40,7 +40,7 @@ standalone-keycloak.xml - ../subsystem-war/src/main/resources/META-INF/keycloak-server.json + src/main/keycloak-server.json standalone/configuration diff --git a/distribution/server-overlay/pom.xml b/distribution/server-overlay/pom.xml index a9f16a2962..f68f678dc8 100755 --- a/distribution/server-overlay/pom.xml +++ b/distribution/server-overlay/pom.xml @@ -16,7 +16,7 @@ org.keycloak - keycloak-server-feature-pack + keycloak-jboss-modules zip @@ -61,9 +61,9 @@ org.keycloak - keycloak-server-feature-pack + keycloak-jboss-modules zip - ${project.build.directory}/unpacked + ${project.build.directory}/unpacked/modules diff --git a/distribution/server-overlay/src/main/keycloak-server.json b/distribution/server-overlay/src/main/keycloak-server.json new file mode 100644 index 0000000000..9f0d03ea5d --- /dev/null +++ b/distribution/server-overlay/src/main/keycloak-server.json @@ -0,0 +1,72 @@ +{ + "admin": { + "realm": "master" + }, + + "eventsStore": { + "provider": "jpa", + "jpa": { + "exclude-events": [ "REFRESH_TOKEN" ] + } + }, + + "realm": { + "provider": "jpa" + }, + + "user": { + "provider": "jpa" + }, + + "userSessions": { + "provider" : "mem" + }, + + "realmCache": { + "provider": "mem" + }, + + "userCache": { + "provider": "mem", + "mem": { + "maxSize": 20000 + } + }, + + "timer": { + "provider": "basic" + }, + + "theme": { + "default": "keycloak", + "staticMaxAge": 2592000, + "cacheTemplates": true, + "cacheThemes": true, + "folder": { + "dir": "${jboss.server.config.dir}/themes" + } + }, + + "login": { + "provider": "freemarker" + }, + + "account": { + "provider": "freemarker" + }, + + "email": { + "provider": "freemarker" + }, + + "scheduled": { + "interval": 900 + }, + + "connectionsJpa": { + "default": { + "dataSource": "java:jboss/datasources/KeycloakDS", + "databaseSchema": "update" + } + } +} \ No newline at end of file diff --git a/distribution/server-overlay/src/main/providers/README.txt b/distribution/server-overlay/src/main/providers/README.txt new file mode 100644 index 0000000000..a6d523b43f --- /dev/null +++ b/distribution/server-overlay/src/main/providers/README.txt @@ -0,0 +1,2 @@ +Any provider implementation jars and libraries in this folder will be loaded by Keycloak. See the providers +section in the documentation for more details. \ No newline at end of file diff --git a/distribution/server-overlay/src/main/themes/README.txt b/distribution/server-overlay/src/main/themes/README.txt new file mode 100644 index 0000000000..705b73ac69 --- /dev/null +++ b/distribution/server-overlay/src/main/themes/README.txt @@ -0,0 +1,3 @@ +Themes to configure the look and feel of login pages and account management console. It's not recommended to +modify existing the built-in themes, instead you should create a new theme that extends a built-in theme. See the theme +section in the documentation for more details. \ No newline at end of file diff --git a/distribution/server-overlay/src/main/xslt/standalone.xsl b/distribution/server-overlay/src/main/xslt/standalone.xsl index 9e7d309d54..dd17b23830 100755 --- a/distribution/server-overlay/src/main/xslt/standalone.xsl +++ b/distribution/server-overlay/src/main/xslt/standalone.xsl @@ -1,12 +1,10 @@ + exclude-result-prefixes="xalan j ds k"> @@ -17,7 +15,6 @@ - @@ -48,22 +45,6 @@ - - - - - - - - - - - - - - - - From a507771f7ce347f57389954a13342f7bf750d297 Mon Sep 17 00:00:00 2001 From: Stian Thorgersen Date: Mon, 18 May 2015 14:02:19 +0200 Subject: [PATCH 3/3] Fix demo dist --- distribution/demo-dist/assembly.xml | 8 --- distribution/demo-dist/pom.xml | 26 +++++++ .../demo-dist/src/main/keycloak-server.json | 72 +++++++++++++++++++ .../demo-dist/src/main/providers/README.txt | 2 + .../demo-dist/src/main/themes/README.txt | 3 + .../demo-dist/src/main/xslt/standalone.xsl | 72 +++++++++++++++++++ 6 files changed, 175 insertions(+), 8 deletions(-) create mode 100644 distribution/demo-dist/src/main/keycloak-server.json create mode 100644 distribution/demo-dist/src/main/providers/README.txt create mode 100644 distribution/demo-dist/src/main/themes/README.txt create mode 100755 distribution/demo-dist/src/main/xslt/standalone.xsl diff --git a/distribution/demo-dist/assembly.xml b/distribution/demo-dist/assembly.xml index b45f88196e..f00bfea444 100755 --- a/distribution/demo-dist/assembly.xml +++ b/distribution/demo-dist/assembly.xml @@ -14,7 +14,6 @@ keycloak **/*.sh - standalone/configuration/standalone.xml standalone/configuration/standalone-keycloak.xml @@ -36,11 +35,4 @@ - - - ${project.build.directory}/unpacked/wildfly-${wildfly.version}/standalone/configuration/standalone-keycloak.xml - keycloak/standalone/configuration - standalone.xml - - diff --git a/distribution/demo-dist/pom.xml b/distribution/demo-dist/pom.xml index c94687137a..1e8f6adcb8 100755 --- a/distribution/demo-dist/pom.xml +++ b/distribution/demo-dist/pom.xml @@ -115,6 +115,32 @@ + + org.codehaus.mojo + xml-maven-plugin + 1.0 + + + generate-resources + package + + transform + + + + + ${project.build.directory}/unpacked/wildfly-${wildfly.version}/standalone/configuration + src/main/xslt/standalone.xsl + + standalone.xml + + ${project.build.directory}/unpacked/wildfly-${wildfly.version}/standalone/configuration + + + + + + maven-assembly-plugin diff --git a/distribution/demo-dist/src/main/keycloak-server.json b/distribution/demo-dist/src/main/keycloak-server.json new file mode 100644 index 0000000000..9f0d03ea5d --- /dev/null +++ b/distribution/demo-dist/src/main/keycloak-server.json @@ -0,0 +1,72 @@ +{ + "admin": { + "realm": "master" + }, + + "eventsStore": { + "provider": "jpa", + "jpa": { + "exclude-events": [ "REFRESH_TOKEN" ] + } + }, + + "realm": { + "provider": "jpa" + }, + + "user": { + "provider": "jpa" + }, + + "userSessions": { + "provider" : "mem" + }, + + "realmCache": { + "provider": "mem" + }, + + "userCache": { + "provider": "mem", + "mem": { + "maxSize": 20000 + } + }, + + "timer": { + "provider": "basic" + }, + + "theme": { + "default": "keycloak", + "staticMaxAge": 2592000, + "cacheTemplates": true, + "cacheThemes": true, + "folder": { + "dir": "${jboss.server.config.dir}/themes" + } + }, + + "login": { + "provider": "freemarker" + }, + + "account": { + "provider": "freemarker" + }, + + "email": { + "provider": "freemarker" + }, + + "scheduled": { + "interval": 900 + }, + + "connectionsJpa": { + "default": { + "dataSource": "java:jboss/datasources/KeycloakDS", + "databaseSchema": "update" + } + } +} \ No newline at end of file diff --git a/distribution/demo-dist/src/main/providers/README.txt b/distribution/demo-dist/src/main/providers/README.txt new file mode 100644 index 0000000000..a6d523b43f --- /dev/null +++ b/distribution/demo-dist/src/main/providers/README.txt @@ -0,0 +1,2 @@ +Any provider implementation jars and libraries in this folder will be loaded by Keycloak. See the providers +section in the documentation for more details. \ No newline at end of file diff --git a/distribution/demo-dist/src/main/themes/README.txt b/distribution/demo-dist/src/main/themes/README.txt new file mode 100644 index 0000000000..705b73ac69 --- /dev/null +++ b/distribution/demo-dist/src/main/themes/README.txt @@ -0,0 +1,3 @@ +Themes to configure the look and feel of login pages and account management console. It's not recommended to +modify existing the built-in themes, instead you should create a new theme that extends a built-in theme. See the theme +section in the documentation for more details. \ No newline at end of file diff --git a/distribution/demo-dist/src/main/xslt/standalone.xsl b/distribution/demo-dist/src/main/xslt/standalone.xsl new file mode 100755 index 0000000000..5de72afe94 --- /dev/null +++ b/distribution/demo-dist/src/main/xslt/standalone.xsl @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + jdbc:h2:${jboss.server.data.dir}/keycloak;AUTO_SERVER=TRUE + h2 + + sa + sa + + + + + + + + + + + + true + auth + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file