[keycloak-dev] Maven dependencies for custom ActionToken implementation

Felix Peters peters at develop4edu.de
Wed Mar 14 05:49:19 EDT 2018


I have an update to this question. When i deploy the module without maven its working with this dependencies in the module.xml:

    <dependencies>
        <module name="org.keycloak.keycloak-core"/>
        <module name="org.keycloak.keycloak-server-spi"/>
        <module name="org.keycloak.keycloak-server-spi-private"/>
        <module name="org.keycloak.keycloak-services"/>
    </dependencies>

So I think the problem is the combination of wildfly-maven-plugin and the keycloak-services dependency.
Maybe maven does not provide the right dependencies for the module?
Is there a way to debug which dependencies are defined for my module if I deploy it via wildfly-maven-plugin?

Do I need another maven plugin to make it work? 
At the moment I have the plugins defined in the quickstart repository:

            <plugin>
                <groupId>org.wildfly.plugins</groupId>
                <artifactId>wildfly-maven-plugin</artifactId>
                <version>1.1.0.Final</version>
                <configuration>
                    <skip>false</skip>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.jboss.as.plugins</groupId>
                <artifactId>jboss-as-maven-plugin</artifactId>
                <version>7.4.Final</version>
                <configuration>
                    <skip>false</skip>
                </configuration>
            </plugin>


Cheers,
Felix

-----Ursprüngliche Nachricht-----
Von: keycloak-dev-bounces at lists.jboss.org <keycloak-dev-bounces at lists.jboss.org> Im Auftrag von Felix Peters
Gesendet: Dienstag, 13. März 2018 21:36
An: keycloak-dev at lists.jboss.org
Betreff: [keycloak-dev] Maven dependencies for custom ActionToken implementation

Hi,

i try to implement a custom ActionToken. I want to deploy the Module via wildfly-maven-plugin.
This works like expected. No errors when i run "mvn clean install wildfly:deploy". But when i try to instantiate a ActionToken i get the following exception:

Uncaught server error: java.lang.NoClassDefFoundError: Failed to link my/package/actiontoken/TestActionToken (Module "deployment.keycloak-actiotokentest-1.0-SNAPSHOT.jar" from Service Module Loader): org/keycloak/authentication/actiontoken/DefaultActionToken

In my pom.xml i have this dependencies for Keycloak:

<properties>
    <keycloak.version>3.4.3.Final</keycloak.version>
</properties>
<dependency>
    <groupId>org.keycloak</groupId>
    <artifactId>keycloak-core</artifactId>
    <scope>provided</scope>
    <version>${keycloak.version}</version>
</dependency>
<dependency>
    <groupId>org.keycloak</groupId>
    <artifactId>keycloak-server-spi</artifactId>
    <scope>provided</scope>
    <version>${keycloak.version}</version>
</dependency>
<dependency>
    <groupId>org.keycloak</groupId>
    <artifactId>keycloak-server-spi-private</artifactId>
    <scope>provided</scope>
    <version>${keycloak.version}</version>
</dependency>
<dependency>
    <groupId>org.keycloak</groupId>
    <artifactId>keycloak-services</artifactId>
    <version>${keycloak.version}</version>
</dependency>

In the quickstart example (https://github.com/keycloak/keycloak-quickstarts/blob/latest/action-token-authenticator/pom.xml) they have the keycloak-services dependency not in the provided scope. I tries to use this scope and i removed it. But i always get the same error.


So what dependencies do i have to define if i want to implement a custom ActionToken? I think it's the keycloak-services, but i can't find details about that.
Is the keycloak-services a provided artifact or not?


Thanks for your help,
Felix

_______________________________________________
keycloak-dev mailing list
keycloak-dev at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/keycloak-dev



More information about the keycloak-dev mailing list