keycloak: Unable setup keycloak in windows from source code.

Before reporting an issue

Area

core

Describe the bug

We are facing issue while setup the application locally from source code I am refering this guide for local setup on windows machine.

java -version mvn -version git --version after this I got this.

$ java -version

java version "20.0.1" 2023-04-18
Java(TM) SE Runtime Environment (build 20.0.1+9-29)
Java HotSpot(TM) 64-Bit Server VM (build 20.0.1+9-29, mixed mode, sharing)

$ mvn -version

Apache Maven 3.9.2 (c9616018c7a021c1c39be70fb2843d6f5f9b8a1c)
Maven home: F:\workspace\apache-maven-3.9.2
Java version: 20.0.1, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk-20
Default locale: en_IN, platform encoding: UTF-8
OS name: "windows 11", version: "10.0", arch: "amd64", family: "windows"

$ git --version git version 2.40.0.windows.1

Then i execute this command after cloning in my keycloak source code folder.

mvn clean install

I got below error

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  03:18 min
[INFO] Finished at: 2023-07-16T09:33:11+05:30
[INFO] ------------------------------------------------------------------------
[WARNING]
[WARNING] Plugin validation issues were detected in 10 plugin(s)
[WARNING]
[WARNING]  * org.apache.felix:maven-bundle-plugin:2.4.0
[WARNING]  * org.apache.maven.plugins:maven-jar-plugin:3.1.2
[WARNING]  * org.apache.maven.plugins:maven-install-plugin:2.5.2
[WARNING]  * org.apache.maven.plugins:maven-resources-plugin:3.2.0
[WARNING]  * org.apache.maven.plugins:maven-compiler-plugin:3.8.1
[WARNING]  * org.apache.maven.plugins:maven-clean-plugin:3.1.0
[WARNING]  * org.codehaus.mojo:buildnumber-maven-plugin:1.4
[WARNING]  * org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M7
[WARNING]  * org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M3
[WARNING]  * org.apache.maven.plugins:maven-source-plugin:3.1.0
[WARNING]
[WARNING] For more or less details, use 'maven.plugin.validation' property with one of the values (case insensitive): [BRIEF, DEFAULT, VERBOSE]
[WARNING]
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M7:test (default-test) on project keycloak-services: There are test failures.
[ERROR]
[ERROR] Please refer to F:\workspace\keycloak\keycloak-22.0.0-source\keycloak\services\target\surefire-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :keycloak-services

mvn clean install -DskipTests=true If I skip the testcase I am getting this error.

Unresolved dependency: 'org.keycloak.testsuite:integration-arquillian-servers-app-server-wildfly:jar:999.0.0-SNAPSHOT'

I have refer this suggestion from @Ezreal147

somehow its working after doing this but its not creating any distribution

mvn clean install -Pdistribution -DskipTests=true

this also no luck, please suggest what i missed here.

Version

22.0.0

Expected behavior

mvn clean install

It suppose run whole keycloak on window machine locally

Actual behavior

[WARNING]
[WARNING] Plugin validation issues were detected in 10 plugin(s)
[WARNING]
[WARNING]  * org.apache.felix:maven-bundle-plugin:2.4.0
[WARNING]  * org.apache.maven.plugins:maven-jar-plugin:3.1.2
[WARNING]  * org.apache.maven.plugins:maven-install-plugin:2.5.2
[WARNING]  * org.apache.maven.plugins:maven-resources-plugin:3.2.0
[WARNING]  * org.apache.maven.plugins:maven-compiler-plugin:3.8.1
[WARNING]  * org.apache.maven.plugins:maven-clean-plugin:3.1.0
[WARNING]  * org.codehaus.mojo:buildnumber-maven-plugin:1.4
[WARNING]  * org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M7
[WARNING]  * org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M3
[WARNING]  * org.apache.maven.plugins:maven-source-plugin:3.1.0
[WARNING]
[WARNING] For more or less details, use 'maven.plugin.validation' property with one of the values (case insensitive): [BRIEF, DEFAULT, VERBOSE]
[WARNING]
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M7:test (default-test) on project keycloak-services: There are test failures.
[ERROR]
[ERROR] Please refer to F:\workspace\keycloak\keycloak-22.0.0-source\keycloak\services\target\surefire-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :keycloak-services

How to Reproduce?

here are the details

OS windows 11.

$ java -version
java version "20.0.1" 2023-04-18
Java(TM) SE Runtime Environment (build 20.0.1+9-29)
Java HotSpot(TM) 64-Bit Server VM (build 20.0.1+9-29, mixed mode, sharing)
$ mvn -version
Apache Maven 3.9.2 (c9616018c7a021c1c39be70fb2843d6f5f9b8a1c)
Maven home: F:\workspace\apache-maven-3.9.2
Java version: 20.0.1, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk-20
Default locale: en_IN, platform encoding: UTF-8
OS name: "windows 11", version: "10.0", arch: "amd64", family: "windows"
$ git --version
git version 2.40.0.windows.1

Anything else?

No response

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 33 (24 by maintainers)

Most upvoted comments

can you guys share with us the whole stack trace (the part before the build summary, where the error happened)?

Thank you @Pepo48 for linking the issue. Suggested workaround while this is being fixed for building Keycloak: On Windows, add two profiles (Windows and the usual default profile) on the command line like this from the root folder:

mvnw clean install -Pwindows-properties-cli,app-server-wildfly ...

@christian-2 - if you see failing tests on Windows, please provide the full log output of the Maven command. Only then will I know which tests failed.