<?xml version='1.0' encoding='UTF-8'?>
<features xmlns="http://karaf.apache.org/xmlns/features/v1.0.0" name="keycloak-${project.version}">

    <feature name="keycloak-adapter-core" version="${project.version}" resolver="(obr)">
        <details>The keycloak adapter core stuff</details>
        <bundle dependency="true">mvn:org.keycloak/keycloak-osgi-thirdparty/${project.version}</bundle>
        <bundle dependency="true">mvn:org.bouncycastle/bcprov-jdk15on/${bouncycastle.crypto.version}</bundle>
        <bundle dependency="true">mvn:org.bouncycastle/bcpkix-jdk15on/${bouncycastle.crypto.version}</bundle>
        <bundle dependency="true">mvn:org.codehaus.jackson/jackson-core-asl/${jackson.version}</bundle>
        <bundle dependency="true">mvn:org.codehaus.jackson/jackson-mapper-asl/${jackson.version}</bundle>
        <bundle dependency="true">mvn:org.codehaus.jackson/jackson-xc/${jackson.version}</bundle>
        <bundle dependency="true">mvn:org.jboss.logging/jboss-logging/${jboss.logging.version}</bundle>
        <bundle>mvn:org.keycloak/keycloak-common/${project.version}</bundle>
        <bundle>mvn:org.keycloak/keycloak-core/${project.version}</bundle>
        <bundle>mvn:org.keycloak/keycloak-adapter-spi/${project.version}</bundle>
        <bundle>mvn:org.keycloak/keycloak-adapter-core/${project.version}</bundle>
    </feature>

    <feature name="keycloak-osgi-adapter" version="${project.version}" resolver="(obr)">
        <details>The keycloak adapter core stuff</details>
        <feature>keycloak-adapter-core</feature>
        <feature version="[2.3,4)">http-whiteboard</feature>
        <bundle>mvn:org.keycloak/keycloak-osgi-adapter/${project.version}</bundle>
    </feature>

    <feature name="keycloak-jetty8-adapter" version="${project.version}" resolver="(obr)">
        <details>The keycloak Jetty8 adapter</details>
        <feature>keycloak-adapter-core</feature>
        <feature version="[8.1,9)">jetty</feature>
        <bundle>mvn:org.keycloak/keycloak-jetty-adapter-spi/${project.version}</bundle>
        <bundle>mvn:org.keycloak/keycloak-jetty-core/${project.version}</bundle>
        <bundle>mvn:org.keycloak/keycloak-jetty81-adapter/${project.version}</bundle>
    </feature>

    <feature name="keycloak-jaas" version="${project.version}" resolver="(obr)">
        <details>The keycloak JAAS configuration</details>
        <feature>keycloak-adapter-core</feature>
        <bundle>mvn:org.keycloak/keycloak-osgi-jaas/${project.version}</bundle>
    </feature>

    <feature name="keycloak" version="${project.version}" resolver="(obr)">
        <details>The keycloak adapter core stuff</details>
        <feature>keycloak-osgi-adapter</feature>
        <feature>keycloak-jetty8-adapter</feature>
        <feature>keycloak-jaas</feature>
    </feature>

    <!-- This is just simplification to upgrade paxweb to 3.1.2 in JBoss Fuse 6.1 or Karaf 2.3.X environment -->
    <feature name="keycloak-pax-web-upgrade" version="${project.version}" resolver="(obr)">
        <details>This is just simplification to upgrade paxweb to 3.1.2 in JBoss Fuse 6.1 or Karaf 2.3.X environment</details>
        <bundle>mvn:org.ow2.asm/asm-all/5.0</bundle>
        <bundle>mvn:org.apache.xbean/xbean-bundleutils/3.18</bundle>
        <bundle>mvn:org.apache.xbean/xbean-reflect/3.18</bundle>
        <bundle>mvn:org.apache.xbean/xbean-finder/3.18</bundle>
    </feature>

</features>