I'm trying to get the keycloak quick start applications connected to keycloak and learn how the authorization mechanism works.
I'm following this guide: https://www.keycloak.org/docs/latest/authorization_services/#_getting_started_overview
I've done these steps:
sudo apt install openjdk-8-jre-headless
sudo apt install openjdk-8-jdk-headless
./bin/standalone.sh -Djboss.socket.binding.port-offset=100
for Keycloak so its running at http://localhost:8180./bin/standalone.sh
for Wildfly so its running at http://localhost:8080mvn clean package wildfly:deploy
in app-authz-jee-vanilla directory.Following the guide I mentioned, I'm stuck in the Build, Deploy, and Test Your Application section. I try to build the app-authz-jee-vanilla app but I keep getting this error:
[ERROR] Failed to execute goal org.wildfly.plugins:wildfly-maven-plugin:1.2.2.Final:deploy (default-cli) on project keycloak-app-authz-jee-vanilla: Execution default-cli of goal org.wildfly.plugins:wildfly-maven-plugin:1.2.2.Final:deploy failed: Plugin org.wildfly.plugins:wildfly-maven-plugin:1.2.2.Final or one of its dependencies could not be resolved: Could not find artifact sun.jdk:jconsole:jar:jdk at specified path /usr/lib/jvm/java-8-openjdk-amd64/jre/../lib/jconsole.jar
Looks like maven cannot deal with some dependency. But I dont know how to solve it!
I would be thankful if anybody can solve this problem.
So finally I've managed to solve the problem. I did some steps according to searching and comments. The steps were:
mvn clean org.wildfly.plugins:wildfly-maven-plugin:2.1.0.Final:deploy
And VOILA! Build is successful and I now have access to the app in my browser.
P. S. Actually I'm not sure if the main problem was with existance of JRE and JDK on my machine at the same time because I didn't test it with JRE installed.