Search code examples
javajax-rsresteasykeycloak

Minimal dependency on RestEasy when using Keycloak Java admin api


Keycloak Java Admin api works nice, however, including RestEasy dependencies in our pom.xml causing issues like this:

RESTEASY002307: Failed to execute
javax.ws.rs.NotFoundException: RESTEASY003210: Could not find resource for full path: http://localhost:8080/

I wonder is there any configuration for RestEasy to work with "minimal" settings which are required by Keycloak Java Admin api? Nothing more than that. What we have tried so far without success:

  • Disabling rest easy scanning in web.xml
  • Map RestEasy to dummy url like /restdummy

Our pom.xml:

    <dependency>
        <groupId>org.keycloak</groupId>
        <artifactId>keycloak-admin-client</artifactId>
        <version>4.6.0.Final</version>
    </dependency>

    <dependency>
        <groupId>org.jboss.resteasy</groupId>
        <artifactId>resteasy-client</artifactId>
        <version>3.6.2.Final</version>
    </dependency>

    <dependency>
        <groupId>org.jboss.resteasy</groupId>
        <artifactId>resteasy-jackson2-provider</artifactId>
        <version>3.6.2.Final</version>
    </dependency>

Any advice is welcome.


Solution

  • You can find the dependencies from mvnrepository for keycloak-admin-client