From 6900f4e6473cc1d0f574979d3ee1c560dfd367b8 Mon Sep 17 00:00:00 2001 From: Hugo Renard Date: Tue, 17 May 2022 14:48:45 +0200 Subject: [PATCH] (feat) suppor kc 18 on quarkus + move to gradle --- .gitignore | 5 +- .gitlab-ci.yml | 7 +- build.gradle | 40 ++++++++++ docker-compose.yml | 21 +++-- pom.xml | 188 --------------------------------------------- 5 files changed, 57 insertions(+), 204 deletions(-) create mode 100644 build.gradle delete mode 100644 pom.xml diff --git a/.gitignore b/.gitignore index 40d9acab97..b974351ba3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ -/target -/.idea \ No newline at end of file +/build +/.idea +/.gradle \ No newline at end of file diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 010a802280..9247aa602d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,10 +1,11 @@ package: image: - name: maven:3-openjdk-11 + name: gradle:jdk11 script: - - mvn clean install + - gradle jar shadowjar artifacts: paths: - - target/keycloak-scim-1.0-SNAPSHOT-jar-with-dependencies.jar + - build/libs/keycloak-scim-1.0-SNAPSHOT.jar + - build/libs/keycloak-scim-1.0-SNAPSHOT-all.jar only: - main diff --git a/build.gradle b/build.gradle new file mode 100644 index 0000000000..92af4ee241 --- /dev/null +++ b/build.gradle @@ -0,0 +1,40 @@ +plugins { + id 'java' + id 'com.github.johnrengelman.shadow' version '7.1.2' +} + +group = 'sh.libre.scim' +version = '1.0-SNAPSHOT' +description = 'keycloak-scim' + +java.sourceCompatibility = JavaVersion.VERSION_11 + +repositories { + mavenLocal() + mavenCentral() +} + +dependencies { + compileOnly 'org.keycloak:keycloak-core:18.0.0' + compileOnly 'org.keycloak:keycloak-server-spi:18.0.0' + compileOnly 'org.keycloak:keycloak-server-spi-private:18.0.0' + compileOnly 'org.keycloak:keycloak-services:18.0.0' + compileOnly 'org.keycloak:keycloak-model-jpa:18.0.0' + implementation 'io.github.resilience4j:resilience4j-retry:1.7.0' + implementation('com.unboundid.product.scim2:scim2-sdk-client:2.3.7') { + transitive false + } + implementation('com.unboundid.product.scim2:scim2-sdk-common:2.3.7') { + transitive false + } + implementation('org.wildfly.client:wildfly-client-config:1.0.1.Final') { + transitive false + } + implementation('org.jboss.resteasy:resteasy-client:4.7.6.Final') { + transitive false + } + implementation('org.jboss.resteasy:resteasy-client-api:4.7.6.Final') { + transitive false + } + +} diff --git a/docker-compose.yml b/docker-compose.yml index 3c090232a6..d18aa1ef3e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,19 +11,18 @@ services: ports: - 5432:5432 keycloak: - image: quay.io/keycloak/keycloak:16.1.1 + image: quay.io/keycloak/keycloak:18.0.0 + build: . + command: start-dev volumes: - - ./target/keycloak-scim-1.0-SNAPSHOT-jar-with-dependencies.jar:/opt/jboss/keycloak/standalone/deployments/keycloak-scim-1.0-SNAPSHOT.jar + - ./build/libs/keycloak-scim-1.0-SNAPSHOT-all.jar:/opt/keycloak/providers/keycloak-scim-1.0-SNAPSHOT-all.jar environment: - DB_VENDOR: POSTGRES - DB_ADDR: postgres - DB_DATABASE: keycloak - DB_USER: keycloak - DB_SCHEMA: public - DB_PASSWORD: keycloak - KEYCLOAK_USER: admin - KEYCLOAK_PASSWORD: admin - KEYCLOAK_LOGLEVEL: DEBUG + KC_DB: postgres + KC_DB_URL_HOST: postgres + KC_DB_USERNAME: keycloak + KC_DB_PASSWORD: keycloak + KEYCLOAK_ADMIN: admin + KEYCLOAK_ADMIN_PASSWORD: admin ports: - 127.0.0.1:8080:8080 depends_on: diff --git a/pom.xml b/pom.xml deleted file mode 100644 index 866b05a69a..0000000000 --- a/pom.xml +++ /dev/null @@ -1,188 +0,0 @@ - - - - 4.0.0 - - sh.libre.scim - keycloak-scim - 1.0-SNAPSHOT - - keycloak-scim - - http://www.example.com - - - UTF-8 - 11 - 11 - 16.1.0 - 1.6.10 - 2.12.1 - 3.15.1.Final - 1.7.0 - - - - - org.keycloak - keycloak-core - provided - ${keycloak.version} - - - org.keycloak - keycloak-server-spi - provided - ${keycloak.version} - - - org.keycloak - keycloak-server-spi-private - provided - ${keycloak.version} - - - org.keycloak - keycloak-services - provided - ${keycloak.version} - - - org.keycloak - keycloak-model-jpa - provided - ${keycloak.version} - - - com.unboundid.product.scim2 - scim2-sdk-client - 2.3.7 - - - javax.ws.rs - javax.ws.rs-api - 2.1.1 - provided - - - javax.xml.bind - jaxb-api - 2.3.1 - provided - - - com.fasterxml.jackson.core - jackson-core - ${jackson.version} - provided - - - com.fasterxml.jackson.core - jackson-databind - ${jackson.version} - provided - - - com.fasterxml.jackson.core - jackson-annotations - ${jackson.version} - provided - - - com.fasterxml.jackson.module - jackson-module-jaxb-annotations - ${jackson.version} - provided - - - com.fasterxml.jackson.datatype - jackson-datatype-jdk8 - ${jackson.version} - provided - - - com.fasterxml.jackson.jaxrs - jackson-jaxrs-json-provider - ${jackson.version} - provided - - - com.fasterxml.jackson.jaxrs - jackson-jaxrs-base - ${jackson.version} - provided - - - org.jboss.resteasy - resteasy-jaxrs - ${resteasy.version} - provided - - - org.jboss.resteasy - resteasy-multipart-provider - ${resteasy.version} - provided - - - org.jboss.resteasy - resteasy-jackson2-provider - ${resteasy.version} - provided - - - org.jboss.resteasy - resteasy-jaxb-provider - ${resteasy.version} - provided - - - org.jboss.resteasy - resteasy-client - ${resteasy.version} - provided - - - io.github.resilience4j - resilience4j-retry - ${resilience4jVersion} - - - - - - - org.wildfly.plugins - wildfly-maven-plugin - 2.1.0 - - false - - - - org.apache.maven.plugins - maven-assembly-plugin - 2.6 - - - make-assembly - package - - single - - - - - ${main.class} - - - - jar-with-dependencies - - - - - - - - \ No newline at end of file