<?xml version="1.0" encoding="UTF-8"?>
<!--

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

         http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
-->
<features name="cellar-1.0.0" xmlns="http://karaf.apache.org/xmlns/features/v1.6.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.3.0 http://karaf.apache.org/xmlns/features/v1.3.0">

    <repository>mvn:org.apache.jclouds.karaf/jclouds-karaf/2.1.2/xml/features</repository>
    <repository>mvn:io.fabric8.kubernetes/kubernetes-karaf/4.6.3/xml/features</repository>
    
    <feature start-level="70" name="cellar-core" description="Karaf clustering core" version="1.0.0">
        <feature>aries-proxy</feature>
        <feature>shell</feature>
        <configfile finalname="${karaf.etc}/org.apache.karaf.cellar.groups.cfg">mvn:ru.entaxy.cellar/apache-karaf-cellar/1.0.0/cfg/groups</configfile>
        <configfile finalname="${karaf.etc}/org.apache.karaf.cellar.node.cfg">mvn:ru.entaxy.cellar/apache-karaf-cellar/1.0.0/cfg/node</configfile>
        <bundle>mvn:ru.entaxy.cellar/org.apache.karaf.cellar.core/1.0.0</bundle>
    </feature>

    <feature start-level="70" name="hazelcast" description="In memory data grid" version="3.12.8">
        <configfile finalname="${karaf.etc}/hazelcast.xml">mvn:ru.entaxy.cellar/apache-karaf-cellar/1.0.0/xml/hazelcast</configfile>
        <feature>transaction</feature>
        <bundle>mvn:javax.cache/cache-api/1.1.0</bundle>
        <bundle>mvn:com.eclipsesource.minimal-json/minimal-json/0.9.2</bundle>
        <bundle>mvn:com.hazelcast/hazelcast-all/3.12.8</bundle>
    </feature>

    <feature start-level="70" name="cellar-hazelcast" description="Cellar implementation based on Hazelcast" version="1.0.0">
        <feature version="3.12.8">hazelcast</feature>
        <feature version="1.0.0">cellar-core</feature>
        <bundle>mvn:ru.entaxy.cellar/org.apache.karaf.cellar.hazelcast/1.0.0</bundle>
        <bundle>mvn:ru.entaxy.cellar/org.apache.karaf.cellar.utils/1.0.0</bundle>
        <capability>
            karaf.cellar.provider;provider:=hazelcast
        </capability>
    </feature>

    <feature start-level="70" name="cellar-config" description="ConfigAdmin cluster support" version="1.0.0">
        <conditional>
            <condition>config</condition>
            <feature dependency="true">cellar-hazelcast</feature>
            <bundle start-level="70">mvn:ru.entaxy.cellar/org.apache.karaf.cellar.config/1.0.0</bundle>
        </conditional>
    </feature>

    <feature start-level="70" name="cellar-features" description="Karaf features cluster support" version="1.0.0">
        <conditional>
            <condition>feature</condition>
            <feature dependency="true">cellar-hazelcast</feature>
            <bundle start-level="70">mvn:ru.entaxy.cellar/org.apache.karaf.cellar.features/1.0.0</bundle>
        </conditional>
    </feature>

    <feature start-level="70" name="cellar-kar" description="Karaf kar cluster support" version="1.0.0">
        <conditional>
            <condition>kar</condition>
            <feature dependency="true">cellar-hazelcast</feature>
            <bundle start-level="70">mvn:ru.entaxy.cellar/org.apache.karaf.cellar.kar/1.0.0</bundle>
        </conditional>
    </feature>

    <feature start-level="70" name="cellar-bundle" description="Bundle cluster support" version="1.0.0">
        <conditional>
            <condition>bundle</condition>
            <feature dependency="true">cellar-hazelcast</feature>
            <bundle start-level="70">mvn:ru.entaxy.cellar/org.apache.karaf.cellar.bundle/1.0.0</bundle>
        </conditional>
    </feature>

    <feature start-level="70" name="cellar-shell" description="Cellar shell support" version="1.0.0">
        <conditional>
            <condition>shell</condition>
            <feature dependency="true">cellar-hazelcast</feature>
            <bundle start-level="70">mvn:ru.entaxy.cellar/org.apache.karaf.cellar.shell/1.0.0</bundle>
        </conditional>
    </feature>

    <feature start-level="70" name="cellar" description="Karaf clustering" version="1.0.0">
        <feature dependency="true">cellar-hazelcast</feature>
        <feature>cellar-shell</feature>
        <feature>cellar-config</feature>
        <feature>cellar-bundle</feature>
        <feature>cellar-features</feature>
        <feature>cellar-kar</feature>
        <requirement>
            karaf.cellar.provider
        </requirement>
    </feature>

    <feature start-level="70" name="cellar-dosgi" description="DOSGi support" version="1.0.0">
        <feature dependency="true">cellar-hazelcast</feature>
        <bundle start-level="40">mvn:ru.entaxy.cellar/org.apache.karaf.cellar.dosgi/1.0.0</bundle>
    </feature>

    <feature start-level="70" name="cellar-obr" description="OBR cluster support" version="1.0.0">
        <conditional>
            <condition>obr</condition>
            <feature dependency="true">cellar-hazelcast</feature>
            <bundle start-level="70">mvn:ru.entaxy.cellar/org.apache.karaf.cellar.obr/1.0.0</bundle>
        </conditional>
    </feature>

    <feature start-level="70" name="cellar-eventadmin" description="OSGi events broadcasting in clusters" version="1.0.0">
        <conditional>
            <condition>eventadmin</condition>
            <feature dependency="true">cellar-hazelcast</feature>
            <bundle start-level="70">mvn:ru.entaxy.cellar/org.apache.karaf.cellar.event/1.0.0</bundle>
        </conditional>
    </feature>

    <feature start-level="70" name="cellar-cloud" description="Cloud blobstore support in clusters" version="1.0.0">
        <feature dependency="true">cellar-hazelcast</feature>
        <feature version="2.1.2">jclouds</feature>
        <!-- Adding S3 as the default Blobstore -->
        <feature>jclouds-aws-s3</feature>
        <bundle>mvn:joda-time/joda-time/2.10</bundle>
        <bundle>mvn:ru.entaxy.cellar/org.apache.karaf.cellar.cloud/1.0.0</bundle>
    </feature>

    <feature start-level="70" name="cellar-kubernetes" description="Cellar Kubernetes support" version="1.0.0">
        <feature>cellar-core</feature>
        <feature>kubernetes-client</feature>
        <bundle>mvn:ru.entaxy.cellar/org.apache.karaf.cellar.kubernetes/1.0.0</bundle>
    </feature>

    <feature start-level="70" name="cellar-dns" description="Cellar DNS support" version="1.0.0">
        <feature>cellar-core</feature>
        <bundle>mvn:ru.entaxy.cellar/org.apache.karaf.cellar.dns/1.0.0</bundle>
    </feature>

    <feature start-level="70" name="cellar-etcd" description="Cellar Etcd discovery support" version="1.0.0">
        <feature>cellar-core</feature>
        <bundle>mvn:com.netflix.feign/feign-core/8.18.0</bundle>
        <bundle>mvn:com.netflix.feign/feign-slf4j/8.18.0</bundle>
        <bundle>mvn:com.netflix.feign/feign-gson/8.18.0</bundle>
        <bundle>mvn:ru.entaxy.cellar/org.apache.karaf.cellar.etcd/1.0.0</bundle>
    </feature>

    <feature start-level="70" name="cellar-webconsole" description="Cellar plugin for Karaf WebConsole" version="1.0.0">
        <conditional>
            <condition>webconsole</condition>
            <feature dependency="true">cellar-hazelcast</feature>
            <bundle start-level="70">mvn:ru.entaxy.cellar/org.apache.karaf.cellar.webconsole/1.0.0</bundle>
        </conditional>
    </feature>

    <feature start-level="70" name="cellar-http-balancer" description="Cellar HTTP request balancer" version="1.0.0">
        <feature dependency="true">cellar-hazelcast</feature>
        <feature>http</feature>
        <feature>http-whiteboard</feature>
        <bundle>mvn:ru.entaxy.cellar.http/org.apache.karaf.cellar.http.balancer/1.0.0</bundle>
    </feature>

    <feature start-level="70" name="cellar-log" description="Cellar central log support" version="1.0.0">
        <conditional>
            <condition>log</condition>
            <feature dependency="true">cellar-hazelcast</feature>
            <bundle start-level="70">mvn:ru.entaxy.cellar/org.apache.karaf.cellar.log/1.0.0</bundle>
        </conditional>
    </feature>

    <feature start-level="70" name="cellar-documentation" description="Documentation of Karaf Cellar sub-project in HTML" version="1.0.0">
        <feature>war</feature>
        <bundle>mvn:ru.entaxy.cellar/manual/1.0.0</bundle>
    </feature>

</features>
