From 96aa4b3394fa586c4520f110ffaab1fc7f4d9f68 Mon Sep 17 00:00:00 2001 From: Jon Koops Date: Mon, 13 Mar 2023 19:16:12 +0100 Subject: [PATCH] Add Maven build for the Admin UI (#17552) --- dependencies/admin-ui/pom.xml | 58 --------- dependencies/pom.xml | 14 --- docs/maven-plugin/pom.xml | 6 - .../META-INF/keycloak-themes.json | 10 ++ .../theme/keycloak.v2/admin/theme.properties | 1 + js/apps/admin-ui/pom.xml | 119 ++++++++++++++++++ js/pom.xml | 1 + pom.xml | 12 +- quarkus/runtime/pom.xml | 43 ++----- testsuite/integration-arquillian/pom.xml | 15 +-- testsuite/utils/pom.xml | 6 - 11 files changed, 144 insertions(+), 141 deletions(-) delete mode 100755 dependencies/admin-ui/pom.xml create mode 100644 js/apps/admin-ui/maven-resources/META-INF/keycloak-themes.json create mode 100644 js/apps/admin-ui/maven-resources/theme/keycloak.v2/admin/theme.properties create mode 100644 js/apps/admin-ui/pom.xml diff --git a/dependencies/admin-ui/pom.xml b/dependencies/admin-ui/pom.xml deleted file mode 100755 index 02d2757632..0000000000 --- a/dependencies/admin-ui/pom.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - keycloak-dependencies-parent - org.keycloak - 999.0.0-SNAPSHOT - - - 4.0.0 - keycloak-dependencies-admin-ui-wrapper - jar - Keycloak Admin UI BOM wrapper - - BOM wrapper for Admin UI to limit Sonatype snapshot repository to admin-ui - - - - - org.keycloak - keycloak-admin-ui - jar - - - - - - sonatype-snapshots - Sonatype Snapshots - https://s01.oss.sonatype.org/content/repositories/snapshots/ - - true - daily - - - false - - - - - diff --git a/dependencies/pom.xml b/dependencies/pom.xml index d649bb43df..019146bf55 100755 --- a/dependencies/pom.xml +++ b/dependencies/pom.xml @@ -35,18 +35,4 @@ server-all - - - skip-admin2 - - - !skipAdmin2 - - - - admin-ui - - - - diff --git a/docs/maven-plugin/pom.xml b/docs/maven-plugin/pom.xml index 988a44d649..04b88566c6 100644 --- a/docs/maven-plugin/pom.xml +++ b/docs/maven-plugin/pom.xml @@ -57,12 +57,6 @@ org.keycloak keycloak-quarkus-server - - - org.keycloak - keycloak-admin-ui - - org.freemarker diff --git a/js/apps/admin-ui/maven-resources/META-INF/keycloak-themes.json b/js/apps/admin-ui/maven-resources/META-INF/keycloak-themes.json new file mode 100644 index 0000000000..4bd6558702 --- /dev/null +++ b/js/apps/admin-ui/maven-resources/META-INF/keycloak-themes.json @@ -0,0 +1,10 @@ +{ + "themes": [ + { + "name": "keycloak.v2", + "types": [ + "admin" + ] + } + ] +} diff --git a/js/apps/admin-ui/maven-resources/theme/keycloak.v2/admin/theme.properties b/js/apps/admin-ui/maven-resources/theme/keycloak.v2/admin/theme.properties new file mode 100644 index 0000000000..f1dbb7215d --- /dev/null +++ b/js/apps/admin-ui/maven-resources/theme/keycloak.v2/admin/theme.properties @@ -0,0 +1 @@ +parent=base \ No newline at end of file diff --git a/js/apps/admin-ui/pom.xml b/js/apps/admin-ui/pom.xml new file mode 100644 index 0000000000..9f48339713 --- /dev/null +++ b/js/apps/admin-ui/pom.xml @@ -0,0 +1,119 @@ + + + 4.0.0 + + + keycloak-js-parent + org.keycloak + 999.0.0-SNAPSHOT + ../../pom.xml + + + keycloak-admin-ui + + Keycloak Admin UI + The user inferface to administrate the Keycloak server. + + + + + maven-resources + + + dist + theme/keycloak.v2/admin/resources + + index.html + + + + + + + org.apache.maven.plugins + maven-deploy-plugin + + true + + + + com.github.eirslett + frontend-maven-plugin + + + npm-build + + npm + + + run build --workspace=admin-ui + + + + + ../.. + + + + com.google.code.maven-replacer-plugin + maven-replacer-plugin + + + process-resources + + replace + + + + + dist/index.html + target/classes/theme/keycloak.v2/admin/index.ftl + false + + + src="./ + src="${resourceUrl}/ + + + href="./ + href="${resourceUrl}/ + + + ]]> + + + { + "loginRealm": "${loginRealm!"master"}", + "authServerUrl": "${authServerUrl}", + "authUrl": "${authUrl}", + "consoleBaseUrl": "${consoleBaseUrl}", + "resourceUrl": "${resourceUrl}", + "masterRealm": "${masterRealm}", + "resourceVersion": "${resourceVersion}", + "isRunningAsTheme": true + } + + +]]> + + + + ]]> + + + <#list properties.styles?split(' ') as style> + + + + +]]> + + + + + + + + diff --git a/js/pom.xml b/js/pom.xml index 6161db8d1e..36840d3747 100644 --- a/js/pom.xml +++ b/js/pom.xml @@ -16,6 +16,7 @@ Parent of all JavaScript related code, sets up Node.js and NPM and installs dependencies for all projects in the workspace. + apps/admin-ui libs/keycloak-admin-client libs/keycloak-js diff --git a/pom.xml b/pom.xml index d196bd27ef..6a589015a0 100644 --- a/pom.xml +++ b/pom.xml @@ -56,8 +56,6 @@ 7.2.0.Final 7.5.22.Final-redhat-1 - ${project.version} - 0.66.19 2.4 @@ -179,7 +177,7 @@ 1.17.5 - 1.3.5 + 1.4.1 7.5.Final 1.9.0 1.0.4 @@ -316,12 +314,6 @@ snakeyaml-engine ${org.snakeyaml.snakeyaml-engine.version} - - org.keycloak - keycloak-dependencies-admin-ui-wrapper - ${project.version} - pom - com.squareup.okhttp3 okhttp @@ -1471,7 +1463,7 @@ org.keycloak keycloak-admin-ui - ${keycloak.admin-ui.version} + ${project.version} org.keycloak diff --git a/quarkus/runtime/pom.xml b/quarkus/runtime/pom.xml index 09004614e4..0a1f7647d3 100644 --- a/quarkus/runtime/pom.xml +++ b/quarkus/runtime/pom.xml @@ -348,6 +348,16 @@ + + org.keycloak + keycloak-admin-ui + + + * + * + + + @@ -665,39 +675,6 @@ - - - skip-admin2 - - - !skipAdmin2 - - - - - org.keycloak - keycloak-dependencies-admin-ui-wrapper - pom - import - - - org.keycloak - keycloak-admin-ui - - - * - * - - - - - org.keycloak - keycloak-rest-admin-ui-ext - - - - - diff --git a/testsuite/integration-arquillian/pom.xml b/testsuite/integration-arquillian/pom.xml index 25267d6fc1..d9ee5a60db 100644 --- a/testsuite/integration-arquillian/pom.xml +++ b/testsuite/integration-arquillian/pom.xml @@ -205,23 +205,10 @@ undertow-embedded ${undertow-embedded.version} - - org.keycloak - keycloak-dependencies-admin-ui-wrapper - pom - ${project.version} - import - org.keycloak keycloak-admin-ui - ${keycloak.admin-ui.version} - - - * - * - - + ${project.version} org.keycloak diff --git a/testsuite/utils/pom.xml b/testsuite/utils/pom.xml index 196b469be3..f1d2a341b7 100755 --- a/testsuite/utils/pom.xml +++ b/testsuite/utils/pom.xml @@ -48,12 +48,6 @@ keycloak-dependencies-server-all pom - - org.keycloak - keycloak-dependencies-admin-ui-wrapper - pom - import - org.keycloak keycloak-admin-ui