Finally found an easy way:
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.2.3.v20140905</version>
<configuration>
<scanIntervalSeconds>2</scanIntervalSeconds>
</configuration>
<dependencies>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-jetty92-adapter</artifactId>
<version>2.0.0.Final</version>
</dependency>
</dependencies>
</plugin>
Maybe someone wants to add this to
Hi,
Is there a way to use the keycloak adapter with jetty-maven-plugin?
I tried with no success:
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.2.3.v20140905</version>
<configuration>
<webApp>
<extraClasspath>${keycloak-jetty-adapter}/lib/keycloak/bcpkix-jdk15on-1.52.jar;
${keycloak-jetty-adapter}/lib/keycloak/commons-logging-1.2.jar;
${keycloak-jetty-adapter}/lib/keycloak/jackson-annotations-2.5.4.jar;
${keycloak-jetty-adapter}/lib/keycloak/jboss-logging-3.3.0.Final.jar;
${keycloak-jetty-adapter}/lib/keycloak/keycloak-common-2.0.0.Final.jar;
${keycloak-jetty-adapter}/lib/keycloak/keycloak-jetty-adapter-spi-2.0.0.Final.jar;
${keycloak-jetty-adapter}/lib/keycloak/bcprov-jdk15on-1.52.jar;
${keycloak-jetty-adapter}/lib/keycloak/httpclient-4.5.jar;
${keycloak-jetty-adapter}/lib/keycloak/jackson-core-2.5.4.jar;
${keycloak-jetty-adapter}/lib/keycloak/keycloak-adapter-core-2.0.0.Final.jar;
${keycloak-jetty-adapter}/lib/keycloak/keycloak-core-2.0.0.Final.jar;
${keycloak-jetty-adapter}/lib/keycloak/keycloak-jetty-core-2.0.0.Final.jar;
${keycloak-jetty-adapter}/lib/keycloak/commons-codec-1.9.jar;
${keycloak-jetty-adapter}/lib/keycloak/httpcore-4.4.1.jar;
${keycloak-jetty-adapter}/lib/keycloak/jackson-databind-2.5.4.jar;
${keycloak-jetty-adapter}/lib/keycloak/keycloak-adapter-spi-2.0.0.Final.jar;
${keycloak-jetty-adapter}/lib/keycloak/keycloak-jetty92-adapter-2.0.0.Final.jar
</extraClasspath>
</webApp>
<scanIntervalSeconds>2</scanIntervalSeconds>
</configuration>
</plugin>
Where ${keycloak-jetty-adapter} is a path with the contents of
keycloak-jetty92-adapter-dist-2.0.0.Final.tar.gz
Running mvn jetty:run throws a ClassNotFoundException:
[WARNING] FAILED
org.eclipse.jetty.security.ConstraintSecurityHandler@834e986:
java.lang.NoClassDefFoundError:
org/eclipse/jetty/server/handler/ContextHandler
java.lang.NoClassDefFoundError:
org/eclipse/jetty/server/handler/ContextHandler
at
org.keycloak.adapters.jetty.core.AbstractKeycloakJettyAuthenticator.initializeKeycloak(AbstractKeycloakJettyAuthenticator.java:221)
at
org.keycloak.adapters.jetty.core.AbstractKeycloakJettyAuthenticator.setConfiguration(AbstractKeycloakJettyAuthenticator.java:175)
at
org.eclipse.jetty.security.SecurityHandler.doStart(SecurityHandler.java:384)
...
Thanks,
Markus.
________________________________
Zum Lesen der rechtlichen Hinweise dieser Mail, kopieren Sie bitte die aufgeführte URL in
Ihren Browser oder folgen Sie dem Link.
http://disclaimer.tec-saar.de/co-met.htm
+----------------------------------------------------------------------+
| SecureMail-Gateway - Stadtwerke Saarbruecken
|
| Ein Dienst fr EMail Signatur und Verschluesselung |
+----------------------------------------------------------------------+
| - Die Nachricht war weder verschluesselt noch digital unterschrieben |
+----------------------------------------------------------------------+
_______________________________________________
keycloak-user mailing list
keycloak-user(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/keycloak-user
+----------------------------------------------------------------------+
| SecureMail-Gateway - Stadtwerke Saarbruecken
|
| Ein Dienst fr EMail Signatur und Verschluesselung |
+----------------------------------------------------------------------+
| - Die Nachricht war weder verschluesselt noch digital unterschrieben |
+----------------------------------------------------------------------+