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

      Licensed to the Apache Software Foundation (ASF) under one or more
      contributor license agreements.  See the NOTICE file distributed with
      this work for additional information regarding copyright ownership.
      The ASF licenses this file to You 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="karaf-2.4.0.redhat-621221" xmlns="http://karaf.apache.org/xmlns/features/v1.2.0">

    <repository>mvn:org.ops4j.pax.web/pax-web-features/3.3.2/xml/features</repository>

    <!--
    <feature name="framework-security" version="2.4.0.redhat-621221" description="OSGi Security for Karaf">
        <bundle start="false" start-level="1">mvn:org.apache.felix/org.apache.felix.framework.security/2.4.0</bundle>
    </feature>
    -->

    <feature name="service-security" version="2.4.0.redhat-621221" description="Services Security for Karaf">
        <feature>aries-proxy</feature>
        <bundle start="true" start-level="10">mvn:org.apache.karaf.service/org.apache.karaf.service.guard/2.4.0.redhat-621221</bundle>
    </feature>

    <feature name="karaf-framework" description="Karaf core feature" version="2.4.0.redhat-621221" resolver="(obr)">
        <bundle start-level="5">mvn:org.ops4j.pax.url/pax-url-aether/2.4.8</bundle>
        <bundle start-level="5">mvn:org.ops4j.pax.url/pax-url-wrap/2.4.8/jar/uber</bundle>
        <bundle start-level="8">mvn:org.ops4j.pax.logging/pax-logging-api/1.8.4</bundle>
        <bundle start-level="8">mvn:org.ops4j.pax.logging/pax-logging-service/1.8.4</bundle>
        <bundle start-level="10">mvn:org.apache.felix/org.apache.felix.configadmin/1.8.4</bundle>
        <bundle start-level="11">mvn:org.apache.felix/org.apache.felix.fileinstall/3.5.0</bundle>
        <bundle start-level="25">mvn:org.apache.karaf.features/org.apache.karaf.features.core/2.4.0.redhat-621221</bundle>
    </feature>

    <feature name="aries-proxy" description="Aries Proxy" version="2.4.0.redhat-621221">
        <bundle dependency="true" start-level="20">mvn:org.ow2.asm/asm-all/5.0.3</bundle>
        <bundle dependency="true" start-level="20">mvn:org.apache.aries/org.apache.aries.util/1.1.3</bundle>
        <bundle start-level="20">mvn:org.apache.aries.proxy/org.apache.aries.proxy.api/1.0.1</bundle>
        <bundle start-level="20">mvn:org.apache.aries.proxy/org.apache.aries.proxy.impl/1.0.5</bundle>
    </feature>

    <feature name="aries-blueprint" description="Aries Blueprint" version="2.4.0.redhat-621221">
        <feature>aries-proxy</feature>
        <bundle start-level="20">mvn:org.apache.aries.blueprint/org.apache.aries.blueprint.api/1.0.1</bundle>
        <bundle start-level="20">mvn:org.apache.aries.blueprint/org.apache.aries.blueprint.cm/1.0.6</bundle>
        <bundle start-level="20">mvn:org.apache.aries.blueprint/org.apache.aries.blueprint.core.compatibility/1.0.0</bundle>
        <bundle start-level="20">mvn:org.apache.aries.blueprint/org.apache.aries.blueprint.core/1.4.5</bundle>
    </feature>

    <feature name="features" description="Karaf Features support" version="2.4.0.redhat-621221">
        <feature>aries-blueprint</feature>
        <bundle start-level="25">mvn:org.apache.karaf.features/org.apache.karaf.features.core/2.4.0.redhat-621221</bundle>
        <conditional>
            <condition>shell</condition>
            <bundle start-level="30">mvn:org.apache.karaf.features/org.apache.karaf.features.command/2.4.0.redhat-621221</bundle>
        </conditional>
        <conditional>
            <condition>management</condition>
            <bundle start-level="30">mvn:org.apache.karaf.features/org.apache.karaf.features.management/2.4.0.redhat-621221</bundle>
        </conditional>
    </feature>

    <feature name="admin" description="Child instance administration" version="2.4.0.redhat-621221">
        <feature>aries-blueprint</feature>
        <feature>shell</feature>
        <feature>features</feature>
        <bundle start-level="30">mvn:org.apache.karaf.admin/org.apache.karaf.admin.core/2.4.0.redhat-621221</bundle>
        <bundle start-level="30">mvn:org.apache.karaf.admin/org.apache.karaf.admin.command/2.4.0.redhat-621221</bundle>
        <conditional>
            <condition>management</condition>
            <bundle start-level="30">mvn:org.apache.karaf.admin/org.apache.karaf.admin.management/2.4.0.redhat-621221</bundle>
        </conditional>
    </feature>

    <feature name="diagnostic" description="Diagnostic support" version="2.4.0.redhat-621221">
        <feature>aries-blueprint</feature>
        <bundle start-level="30">mvn:org.apache.karaf.diagnostic/org.apache.karaf.diagnostic.common/2.4.0.redhat-621221</bundle>
        <conditional>
            <condition>shell</condition>
            <bundle start-level="30">mvn:org.apache.karaf.diagnostic/org.apache.karaf.diagnostic.command/2.4.0.redhat-621221</bundle>
        </conditional>
        <conditional>
            <condition>management</condition>
            <bundle start-level="30">mvn:org.apache.karaf.diagnostic/org.apache.karaf.diagnostic.management/2.4.0.redhat-621221</bundle>
        </conditional>
    </feature>

    <feature name="shell" description="Karaf Shell" version="2.4.0.redhat-621221">
        <feature>aries-blueprint</feature>
        <feature>jaas</feature>
        <bundle start-level="30">mvn:org.apache.karaf.shell/org.apache.karaf.shell.console/2.4.0.redhat-621221</bundle>
        <bundle start-level="30">mvn:org.apache.karaf.shell/org.apache.karaf.shell.commands/2.4.0.redhat-621221</bundle>
        <bundle start-level="30">mvn:org.apache.karaf.shell/org.apache.karaf.shell.osgi/2.4.0.redhat-621221</bundle>
        <bundle start-level="30">mvn:org.apache.karaf.shell/org.apache.karaf.shell.log/2.4.0.redhat-621221</bundle>
        <bundle start-level="30">mvn:org.apache.karaf.shell/org.apache.karaf.shell.packages/2.4.0.redhat-621221</bundle>
        <bundle start-level="30">mvn:org.apache.karaf.shell/org.apache.karaf.shell.dev/2.4.0.redhat-621221</bundle>
    </feature>

    <feature name="deployer" description="Karaf Deployer" version="2.4.0.redhat-621221">
        <feature>aries-blueprint</feature>
        <bundle start="true" start-level="26">mvn:org.apache.karaf.deployer/org.apache.karaf.deployer.features/2.4.0.redhat-621221</bundle>
        <conditional>
            <condition>wrap</condition>
            <bundle start="true" start-level="24">mvn:org.apache.karaf.deployer/org.apache.karaf.deployer.wrap/2.4.0.redhat-621221</bundle>
        </conditional>
        <conditional>
            <condition>aries-blueprint</condition>
            <bundle start="true" start-level="24">mvn:org.apache.karaf.deployer/org.apache.karaf.deployer.blueprint/2.4.0.redhat-621221</bundle>
        </conditional>
        <conditional>
            <condition>spring</condition>
            <bundle start="true" start-level="24">mvn:org.apache.karaf.deployer/org.apache.karaf.deployer.spring/2.4.0.redhat-621221</bundle>
        </conditional>
        <conditional>
            <condition>kar</condition>
            <bundle start="true" start-level="24">mvn:org.apache.karaf.deployer/org.apache.karaf.deployer.kar/2.4.0.redhat-621221</bundle>
        </conditional>
    </feature>

    <feature name="wrapper" description="Provide OS integration" version="2.4.0.redhat-621221">
        <feature>shell</feature>
        <bundle>mvn:org.apache.karaf.shell/org.apache.karaf.shell.wrapper/2.4.0.redhat-621221</bundle>
    </feature>
    <feature name="service-wrapper" description="Provide OS integration (alias to wrapper feature)" version="2.4.0.redhat-621221">
        <feature version="2.4.0.redhat-621221">wrapper</feature>
    </feature>

    <feature name="obr" description="Provide OSGi Bundle Repository (OBR) support" version="2.4.0.redhat-621221">
        <feature>shell</feature>
        <bundle start-level="30">mvn:org.apache.felix/org.osgi.service.obr/1.0.2</bundle>
        <bundle start-level="30">mvn:org.apache.felix/org.apache.felix.bundlerepository/2.0.4</bundle>
        <bundle start-level="30">mvn:org.apache.karaf.shell/org.apache.karaf.shell.obr/2.4.0.redhat-621221</bundle>
        <bundle start-level="30">mvn:org.apache.karaf.features/org.apache.karaf.features.obr/2.4.0.redhat-621221</bundle>
        <bundle start-level="30">mvn:org.ops4j.pax.url/pax-url-obr/2.4.8/jar/uber</bundle>
        <conditional>
            <condition>management</condition>
            <bundle start-level="30">mvn:org.apache.karaf.management.mbeans/org.apache.karaf.management.mbeans.obr/2.4.0.redhat-621221</bundle>
        </conditional>
    </feature>

    <feature name="config" description="Provide OSGi ConfigAdmin support" version="2.4.0.redhat-621221">
        <feature>shell</feature>
        <bundle start-level="30">mvn:org.apache.karaf.shell/org.apache.karaf.shell.config/2.4.0.redhat-621221</bundle>
    </feature>

    <feature name="jetty" description="Provide Jetty engine support" version="8.2.0.v20160908" resolver="(obr)">
        <feature>pax-jetty</feature>
    </feature>

    <feature name="http" description="Implementation of the OSGi HTTP service" version="2.4.0.redhat-621221" resolver="(obr)">
        <feature version="3.3.2">pax-http</feature>
    </feature>

    <feature name="http-whiteboard" description="Provide HTTP Whiteboard pattern support" version="2.4.0.redhat-621221" resolver="(obr)">
        <feature version="3.3.2">pax-http-whiteboard</feature>
    </feature>

    <feature name="war" description="Turn Karaf as a full WebContainer" version="2.4.0.redhat-621221" resolver="(obr)">
        <feature version="3.3.2">pax-war</feature>
        <bundle start-level="30">mvn:org.apache.karaf.shell/org.apache.karaf.shell.web/2.4.0.redhat-621221</bundle>
    </feature>

    <feature name="kar" description="Provide KAR (KARaf archive) support" version="2.4.0.redhat-621221">
        <feature>aries-blueprint</feature>
        <bundle start-level="30">mvn:org.apache.karaf.deployer/org.apache.karaf.deployer.kar/2.4.0.redhat-621221</bundle>
    </feature>

    <!-- ENTESB-2833: Disable Felix webconsole in JBoss Fuse 
    <feature name="webconsole" description="Karaf WebConsole for administration and monitoring" version="2.4.0.redhat-621221">
        <config name="org.apache.karaf.webconsole">
            realm=karaf
            role=admin
        </config>
        <feature>http</feature>
        <feature>aries-blueprint</feature>
        <feature>jaas</feature>
        <bundle start-level="30">mvn:org.apache.felix/org.apache.felix.metatype/1.0.10</bundle>
        <bundle start-level="30">mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.branding/2.4.0.redhat-621221</bundle>
        <bundle start-level="30">mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.console/2.4.0.redhat-621221</bundle>
        <conditional>
            <condition>features</condition>
            <bundle start-level="30">mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.features/2.4.0.redhat-621221</bundle>
        </conditional>
        <conditional>
            <condition>shell</condition>
            <bundle start-level="30">mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.gogo/2.4.0.redhat-621221</bundle>
        </conditional>
        <conditional>
            <condition>eventadmin</condition>
            <bundle start-level="30">mvn:org.apache.felix/org.apache.felix.webconsole.plugins.event/1.1.0</bundle>
        </conditional>
        <conditional>
            <condition>scr</condition>
            <bundle start-level="30">mvn:org.apache.felix/org.apache.felix.webconsole.plugins.ds/1.0.0</bundle>
        </conditional>
        <conditional>
            <condition>instance</condition>
            <bundle start-level="30">mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.admin/2.4.0.redhat-621221</bundle>
        </conditional>
    </feature>
    -->

    <feature name="jaas" description="Provide JAAS support" version="2.4.0.redhat-621221">
        <feature>aries-blueprint</feature>
        <bundle start-level="30" start="true">mvn:org.apache.karaf.jaas/org.apache.karaf.jaas.config/2.4.0.redhat-621221</bundle>
        <bundle start-level="30" start="true">mvn:org.apache.karaf.jaas/org.apache.karaf.jaas.modules/2.4.0.redhat-621221</bundle>
        <conditional>
            <condition>shell</condition>
            <bundle start-level="30" start="true">mvn:org.apache.karaf.jaas/org.apache.karaf.jaas.command/2.4.0.redhat-621221</bundle>
        </conditional>
    </feature>

    <feature name="ssh" description="Provide a SSHd server on Karaf" version="2.4.0.redhat-621221">
        <config name="org.apache.karaf.shell">
            sshPort=8101
            sshHost=0.0.0.0
            sshRealm=karaf
            hostKey=${karaf.etc}/host.key
        </config>
        <feature>shell</feature>
        <feature>jaas</feature>
        <bundle start-level="30" dependency='true'>mvn:org.apache.mina/mina-core/2.0.9</bundle>
        <bundle start-level="30" dependency='true'>mvn:org.apache.sshd/sshd-core/0.14.0.redhat-002</bundle>
        <bundle start-level="30">mvn:org.apache.karaf.shell/org.apache.karaf.shell.ssh/2.4.0.redhat-621221</bundle>
    </feature>

    <feature name="management" description="Provide a JMX MBeanServer and a set of MBeans in Karaf" version="2.4.0.redhat-621221">
        <feature>jaas</feature>
        <feature>aries-blueprint</feature>
        <bundle start-level="30">mvn:org.apache.karaf.management/org.apache.karaf.management.server/2.4.0.redhat-621221</bundle>
        <bundle start-level="30">mvn:org.apache.aries.jmx/org.apache.aries.jmx.api/1.1.1</bundle>
        <bundle start-level="30">mvn:org.apache.aries.jmx/org.apache.aries.jmx.core/1.1.3</bundle>
        <bundle start-level="30">mvn:org.apache.aries.jmx/org.apache.aries.jmx.blueprint.api/1.1.0</bundle>
        <bundle start-level="30">mvn:org.apache.aries.jmx/org.apache.aries.jmx.blueprint.core/1.1.0</bundle>
        <bundle start-level="30">mvn:org.apache.karaf.management.mbeans/org.apache.karaf.management.mbeans.system/2.4.0.redhat-621221</bundle>
        <bundle start-level="30">mvn:org.apache.karaf.management.mbeans/org.apache.karaf.management.mbeans.bundles/2.4.0.redhat-621221</bundle>
        <bundle start-level="30">mvn:org.apache.karaf.management.mbeans/org.apache.karaf.management.mbeans.services/2.4.0.redhat-621221</bundle>
        <bundle start-level="30">mvn:org.apache.karaf.management.mbeans/org.apache.karaf.management.mbeans.config/2.4.0.redhat-621221</bundle>
        <bundle start-level="30">mvn:org.apache.karaf.management.mbeans/org.apache.karaf.management.mbeans.log/2.4.0.redhat-621221</bundle>
        <bundle start-level="30">mvn:org.apache.karaf.management.mbeans/org.apache.karaf.management.mbeans.packages/2.4.0.redhat-621221</bundle>
        <bundle start-level="30">mvn:org.apache.karaf.management.mbeans/org.apache.karaf.management.mbeans.dev/2.4.0.redhat-621221</bundle>
    </feature>

    <feature name="eventadmin" description="OSGi Event Admin service specification for event-based communication" version="2.4.0.redhat-621221">
        <config name="org.apache.felix.eventadmin.impl.EventAdmin">
            org.apache.felix.eventadmin.AddTimestamp=true
            org.apache.felix.eventadmin.AddSubject=true
        </config>
		<bundle start-level='30'>mvn:org.apache.karaf.services/org.apache.karaf.services.eventadmin/2.4.0.redhat-621221</bundle>
    </feature>

    <feature name="jasypt-encryption" description="Advanced encryption support for Karaf security" version="2.4.0.redhat-621221" resolver="(obr)">
        <feature>aries-blueprint</feature>
        <feature>jaas</feature>
        <bundle dependency="true" start-level="30">mvn:commons-codec/commons-codec/1.10</bundle>
        <bundle dependency='true' start-level="30">mvn:commons-lang/commons-lang/2.6</bundle>
        <bundle dependency='true' start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jasypt/1.9.3.redhat_3</bundle>
        <bundle start-level="30">mvn:org.apache.karaf.jaas/org.apache.karaf.jaas.jasypt/2.4.0.redhat-621221</bundle>
    </feature>

    <feature name="blueprint-web" description="Provides an OSGi-aware Servlet ContextListener for bootstrapping blueprint inside web-bundle containers" version="2.4.0.redhat-621221" resolver="(obr)">
        <feature>war</feature>
        <feature>aries-blueprint</feature>
        <bundle>mvn:org.apache.aries.blueprint/org.apache.aries.blueprint.webosgi/1.0.1</bundle>
    </feature>

    <feature name="scr" description="Declarative Service support" version="2.4.0.redhat-621221" resolver="(obr)">
        <bundle dependency="true" start-level="30">mvn:org.apache.felix/org.apache.felix.metatype/1.0.10</bundle>
        <bundle start-level="30">mvn:org.apache.felix/org.apache.felix.scr/1.8.4</bundle>
        <conditional>
            <condition>shell</condition>
            <bundle start-level="30">mvn:org.apache.karaf.shell/org.apache.karaf.shell.scr/2.4.0.redhat-621221</bundle>
        </conditional>
        <conditional>
            <condition>management</condition>
            <bundle start-level="30">mvn:org.apache.karaf.management.mbeans/org.apache.karaf.management.mbeans.scr/2.4.0.redhat-621221</bundle>
        </conditional>
    </feature>

    <feature name="wrap" description="Wrap URL handler">
        <bundle start="true" start-level="5">mvn:org.ops4j.pax.url/pax-url-wrap/2.4.8/jar/uber</bundle>
    </feature>

</features>
