Skip to content

Manual: building scim for keycloak with java and maven

Pascal Knüppel edited this page Oct 9, 2021 · 1 revision

Building the scim-for-keycloak project and using it is fairly simple but it requires some preparation that might be especially difficult for people who have no experience in Java developing. Therefore this manual will provide a step by step list how you will be able to build the scim-for-keycloak project.

  1. download a JDK distribution and install it on your machine: https://openjdk.java.net/install/
    1. Be careful with OracleJDK 9 and higher since the license restrictions need to be respected.
    2. The project is fully compatible with JDK 8 so you may also use OracleJDK 8 that still has a more loose license
      1. https://www.oracle.com/java/technologies/downloads/#java8
  2. install the jdk and verify that you can access java-commands on your command line: java -version should produce a similiar output:
     openjdk version "11.0.11" 2021-04-20
     OpenJDK Runtime Environment (build 11.0.11+9-Ubuntu-0ubuntu2.20.04)
     OpenJDK 64-Bit Server VM (build 11.0.11+9-Ubuntu-0ubuntu2.20.04, mixed mode, sharing)
    
  3. install maven
    1. Install on linux
      1. installing on linux is actually easier than on windows because at least most linux systems have their own install command for maven e.g. for ubuntu : sudo apt install maven
    2. install on windows
      1. download apache maven: https://maven.apache.org/download.cgi
      2. unzip the apache-maven file in any directory of your choice
      3. set environment variable JAVA_HOME to your JDK installation
      4. add maven-bin directory to your PATH environment variable:
        1. e.g. in my case: PATH=...;C:\Program Files\Java\apache-maven-3.6.3\bin;...
      5. open a new console and execute: mvn -version and you should get a similiar output:
          Java version: 11.0.12, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk-11.0.12
          Default locale: de_DE, platform encoding: Cp1252
          OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
        
  4. checkout scim-for-keycloak with git
    1. git clone https://github.com/Captain-P-Goldfish/scim-for-keycloak/
    2. checkout a release-tag as described in the README.MD of the project
  5. Open a terminal in ${path-to-scim-for-keycloak} and execute mvn clean package -DskipTests
  6. find the scim-for-keycloak artifact in: scim-for-keycloak/scim-for-keycloak-deployment/target/scim-for-keycloak-kc-${keycloak.version}-b${project.incremental.version}.ear