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

    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="enterprise-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.3.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">

    <!-- NB: this file is not the one really used. This file is used by the karaf-maven-plugin to define the start-level of bundles in the generated feature.xml -->

    <repository>mvn:org.hibernate.validator/hibernate-validator-osgi-karaf-features/${hibernate.validator.version}/xml/features</repository>
    <!-- <repository>mvn:org.hibernate/hibernate-osgi/${hibernate.version}/xml/karaf</repository> -->
    <repository>mvn:org.ops4j.pax.cdi/pax-cdi-features/${pax.cdi.version}/xml/features</repository>
    <repository>mvn:org.ops4j.pax.jdbc/pax-jdbc-features/${pax.jdbc.version}/xml/features</repository>
    <repository>mvn:org.ops4j.pax.jms/pax-jms-features/${pax.jms.version}/xml/features</repository>
    <repository>mvn:org.ops4j.pax.transx/pax-transx-features/${pax.transx.version}/xml/features</repository>
    <repository>mvn:org.apache.karaf.features/standard/${project.version}/xml/features</repository>
    <repository>mvn:org.apache.aries.jpa/jpa-features/${aries.jpa.version}/xml/features</repository>
    <repository>mvn:org.apache.openjpa/openjpa-features/${openjpa.version}/xml/features</repository>

    <feature name="transaction-api" version="1.2.0">
        <bundle dependency="true">mvn:javax.interceptor/javax.interceptor-api/1.2.2</bundle>
        <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.javax-inject/1_3</bundle>
        <bundle dependency="true">mvn:javax.el/javax.el-api/3.0.0</bundle>
        <bundle dependency="true">mvn:javax.enterprise/cdi-api/1.2</bundle>
        <bundle>mvn:javax.transaction/javax.transaction-api/1.2</bundle>
        <feature>pax-transx-tm-api</feature>
    </feature>

    <feature name="transaction-manager-geronimo" description="Geronimo Transaction Manager" version="${geronimo.transaction.manager.version}">
        <details>JTA implementation provided by Apache Aries Transaction</details>
        <config name="org.ops4j.pax.transx.tm.geronimo">
################################################################################
#
#    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.
#
################################################################################

org.apache.geronimo.tm.recoverable = true
org.apache.geronimo.tm.timeout = 600
org.apache.geronimo.tm.howl.logFileDir = ${karaf.data}/txlog
org.apache.geronimo.tm.howl.maxLogFiles = 2
org.apache.geronimo.tm.howl.maxBlocksPerFile = 512
org.apache.geronimo.tm.howl.bufferSize = 4
        </config>
        <feature version="[1.1,2)">transaction-api</feature>
        <feature>pax-transx-tm-geronimo</feature>
        <capability>
            transaction-manager;provider:=geronimo
        </capability>
    </feature>

    <feature name="transaction-manager-narayana" description="Narayana Transaction Manager" version="${narayana.version}">
        <details>JTA implementation provided by Narayana</details>
        <config name="org.ops4j.pax.transx.tm.narayana">
################################################################################
#
#    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.
#
################################################################################

com.arjuna.ats.arjuna.objectstore.objectStoreDir=${karaf.data}/narayana
com.arjuna.ats.arjuna.objectstore.communicationStore.objectStoreDir=${karaf.data}/narayana
com.arjuna.ats.arjuna.hornetqjournal.storeDir=${karaf.data}/narayana/hornetq
        </config>
        <feature version="[1.1,2)">transaction-api</feature>
        <feature>pax-transx-tm-narayana</feature>
        <capability>
            transaction-manager;provider:=narayana
        </capability>
    </feature>

    <feature name="transaction-manager-atomikos" description="Atomikos Transaction Manager" version="${atomikos.version}">
        <details>JTA implementation provided by Atomikos</details>
        <config name="org.ops4j.pax.transx.tm.atomikos">
################################################################################
#
#    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.
#
################################################################################

com.atomikos.icatch.log_base_dir=${karaf.data}/atomikos
        </config>
        <feature version="[1.1,2)">transaction-api</feature>
        <feature>pax-transx-tm-atomikos</feature>
        <capability>
            transaction-manager;provider:=atomikos
        </capability>
    </feature>

    <feature name="transaction" description="OSGi Transaction Manager" version="2.0">
        <details>JTA Support</details>
        <feature dependency="true">transaction-manager-geronimo</feature>
        <requirement>
            transaction-manager
        </requirement>
        <conditional>
            <condition>aries-blueprint</condition>
            <bundle dependency="true">mvn:org.apache.felix/org.apache.felix.coordinator/${felix.coordinator.version}</bundle>
            <bundle>mvn:org.apache.aries.transaction/org.apache.aries.transaction.blueprint/${aries.transaction.blueprint.version}</bundle>
            <bundle>mvn:org.apache.aries.transaction/org.apache.aries.transaction.blueprint/${aries.transaction.blueprint.version2}</bundle>
        </conditional>
    </feature>

    <feature name="connector" description="OSGi support for JCA Connector 1.6" version="3.1.1">
        <details>OSGi support for JCA Connector 1.6</details>
        <feature version="[2,3)">transaction</feature>
        <bundle dependency="true">mvn:org.apache.geronimo.specs/geronimo-j2ee-connector_1.6_spec/1.0</bundle>
        <bundle dependency="true">mvn:org.apache.geronimo.specs/geronimo-validation_1.0_spec/1.1</bundle>
        <bundle>mvn:org.apache.geronimo.components/geronimo-connector/3.1.4</bundle>
    </feature>

    <feature name="openjpa3" description="OpenJPA engine support" version="${openjpa.version}">
        <bundle dependency="true">mvn:org.apache.xbean/xbean-asm6-shaded/4.9</bundle>
        <feature version="${openjpa.version}">openjpa</feature>
        <capability>
            osgi.service;objectClass=javax.persistence.spi.PersistenceProvider;effective:=active;javax.persistence.provider=org.apache.openjpa.persistence.PersistenceProviderImpl
        </capability>
    </feature>

    <feature name="hibernate" description="Hibernate JPA engine support" version="${hibernate.version}">
        <!-- hibernate-orm feature installs osgi.core and osgi.compendium bundle (it should not), causing huge refresh -->
        <feature prerequisite="true">wrap</feature>
        <feature>transaction-api</feature>
        <feature>aries-blueprint</feature>
        <bundle>mvn:org.jboss.logging/jboss-logging/3.3.2.Final</bundle>
        <bundle>wrap:mvn:antlr/antlr/2.7.7</bundle>
        <bundle>mvn:javax.persistence/javax.persistence-api/2.2</bundle>
        <bundle>mvn:org.javassist/javassist/3.27.0-GA</bundle>
        <bundle>mvn:net.bytebuddy/byte-buddy/1.10.10</bundle>
        <bundle>mvn:org.jboss.spec.javax.transaction/jboss-transaction-api_1.2_spec/1.1.1.Final</bundle>
        <bundle>mvn:org.jboss/jandex/2.2.3.Final</bundle>
        <bundle>mvn:com.fasterxml/classmate/1.5.1</bundle>
        <bundle>wrap:mvn:org.dom4j/dom4j/2.1.1</bundle>
        <bundle>mvn:org.hibernate.common/hibernate-commons-annotations/5.1.0.Final</bundle>
        <bundle>mvn:org.hibernate/hibernate-core/${hibernate.version}</bundle>
        <bundle>mvn:javax.interceptor/javax.interceptor-api/1.2.2</bundle>
        <bundle>mvn:org.hibernate/hibernate-osgi/${hibernate.version}</bundle>
        <capability>
            osgi.service;objectClass=javax.persistence.spi.PersistenceProvider;effective:=active;javax.persistence.provider=org.hibernate.jpa.HibernatePersistenceProvider
        </capability>
    </feature>

    <feature name="hibernate-envers" version="${hibernate.version}" description="Feature for easily adding Envers support to hibernate">
        <feature version="${hibernate.version}">hibernate</feature>
        <bundle>mvn:org.jboss/jandex/2.2.3.Final</bundle>
        <bundle>mvn:org.hibernate/hibernate-envers/${hibernate.version}</bundle>
    </feature>

    <feature name="eclipselink" description="Eclipselink JPA persistence engine support" version="${eclipselink.version}">
        <details>Eclipselink persistence engine.</details>
        <feature version="[2,3)">jpa</feature>
        <bundle dependency="true">mvn:org.eclipse.persistence/javax.persistence/2.2.0</bundle>
        <feature version="[2,3)">transaction</feature>
        <bundle>mvn:org.eclipse.persistence/org.eclipse.persistence.jpa/${eclipselink.version}</bundle>
        <bundle>mvn:org.eclipse.persistence/org.eclipse.persistence.core/${eclipselink.version}</bundle>
        <bundle>mvn:org.eclipse.persistence/org.eclipse.persistence.asm/${eclipselink.version}</bundle>
        <bundle>mvn:org.eclipse.persistence/org.eclipse.persistence.antlr/${eclipselink.version}</bundle>
        <bundle>mvn:org.eclipse.persistence/org.eclipse.persistence.jpa.jpql/${eclipselink.version}</bundle>
        <bundle>mvn:org.apache.aries.jpa/org.apache.aries.jpa.eclipselink.adapter/${aries.jpa.version}</bundle>
        <capability>
            osgi.service;objectClass=javax.persistence.spi.PersistenceProvider;effective:=active;javax.persistence.provider=org.eclipse.persistence.jpa.PersistenceProvider
        </capability>
    </feature>

    <feature name="jndi" description="OSGi Service Registry JNDI access" version="${project.version}">
        <details>JNDI support provided by Apache Aries JNDI ${aries.jndi.version}, including additional service, commands, and MBean.</details>
        <feature>aries-proxy</feature>
        <bundle dependency="true" start-level="30">mvn:org.apache.aries/org.apache.aries.util/${aries.util.version}</bundle>
        <bundle start-level="30">mvn:org.apache.xbean/xbean-naming/${xbean.version}</bundle>
        <bundle start-level="30">mvn:org.apache.aries.jndi/org.apache.aries.jndi.api/${aries.jndi.api.version}</bundle>
        <bundle start-level="30">mvn:org.apache.aries.jndi/org.apache.aries.jndi.core/${aries.jndi.core.version}</bundle>
        <bundle start-level="30">mvn:org.apache.aries.jndi/org.apache.aries.jndi.rmi/${aries.jndi.version}</bundle>
        <bundle start-level="30">mvn:org.apache.aries.jndi/org.apache.aries.jndi.url/${aries.jndi.url.version}</bundle>
        <bundle start-level="30">mvn:org.apache.aries.jndi/org.apache.aries.jndi.legacy.support/${aries.jndi.version}</bundle>
        <bundle start-level="30">mvn:org.apache.karaf.jndi/org.apache.karaf.jndi.core/${project.version}</bundle>
    </feature>

    <feature name="jdbc" description="JDBC service and commands" version="${project.version}">
        <details>JDBC support providing service, commands, and MBean.</details>
        <feature prerequisite="true">pax-jdbc</feature>
        <feature prerequisite="true">pax-jdbc-config</feature>
        <bundle dependency="true">mvn:org.osgi/org.osgi.service.jdbc/${org.osgi.service.jdbc.version}</bundle>
        <bundle>mvn:org.apache.karaf.jdbc/org.apache.karaf.jdbc.core/${project.version}</bundle>
    </feature>

    <feature name="jms" description="JMS service and commands" version="${project.version}">
        <details>JMS support providing service, commands, and MBean.</details>
        <feature>pax-jms-pool</feature>
        <feature>pax-jms-config</feature>
        <feature>pax-jms-pool-transx</feature>
        <feature>transaction</feature>
        <bundle dependency="true">mvn:javax.jms/javax.jms-api/2.0.1</bundle>
        <bundle dependency="true">mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/${geronimo.jta-spec.version}</bundle>
        <bundle dependency="true">mvn:org.apache.geronimo.specs/geronimo-jms_1.1_spec/${geronimo.jms-spec.version}</bundle>
        <bundle dependency="true">mvn:org.apache.commons/commons-pool2/${commons-pool2.version}</bundle>
        <bundle>mvn:org.apache.karaf.jms/org.apache.karaf.jms.core/${project.version}</bundle>
    </feature>

    <feature name="application-without-isolation" description="Provide EBA archive support" version="${aries.application.version}">
        <details>Support of the Aries EBA archives</details>
        <!-- pre-requisites-->
        <feature version="${project.version}">obr</feature>
        <feature>aries-blueprint</feature>
        <!-- common -->
        <bundle dependency="true" start-level="30">mvn:org.apache.aries/org.apache.aries.util/${aries.util.version}</bundle>
        <bundle start-level="30">mvn:org.apache.aries.application/org.apache.aries.application.resolver.obr/${aries.application.version}</bundle>
        <bundle start-level="30">mvn:org.apache.aries.application/org.apache.aries.application.install/${aries.application.version}</bundle>
        <bundle start-level="30">mvn:org.apache.aries.application/org.apache.aries.application.api/${aries.application.api.version}</bundle>
        <bundle start-level="30">mvn:org.apache.aries.application/org.apache.aries.application.management/${aries.application.management.version}</bundle>
        <bundle start-level="30">mvn:org.apache.aries.application/org.apache.aries.application.utils/${aries.application.version}</bundle>
        <bundle start-level="30">mvn:org.apache.aries.application/org.apache.aries.application.modeller/${aries.application.version}</bundle>
        <bundle start-level="30">mvn:org.apache.aries.application/org.apache.aries.application.default.local.platform/${aries.application.version}</bundle>
        <bundle start-level="30">mvn:org.apache.aries.application/org.apache.aries.application.resolver.noop/${aries.application.version}</bundle>
        <bundle start-level="30">mvn:org.apache.aries.application/org.apache.aries.application.deployment.management/${aries.application.version}</bundle>
        <!-- without isolation -->
        <bundle start-level="30">mvn:org.apache.aries.application/org.apache.aries.application.runtime/${aries.application.version}</bundle>
    </feature>

    <feature name="subsystems" description="Support for OSGi subsystems" version="${aries.subsystem.core.version}">
        <details>Support for Aries OSGi subsystems</details>
        <bundle dependency="true" start-level="30">mvn:org.apache.aries/org.apache.aries.util/${aries.util.version}</bundle>
        <bundle dependency="true" start-level="30">mvn:org.apache.karaf.services/org.apache.karaf.services.coordinator/${project.version}</bundle>
        <bundle>mvn:org.apache.aries.subsystem/org.apache.aries.subsystem.api/${aries.subsystem.api.version}</bundle>
        <bundle>mvn:org.apache.aries.subsystem/org.apache.aries.subsystem.core/${aries.subsystem.core.version}</bundle>
        <conditional>
            <condition>shell</condition>
            <bundle>mvn:org.apache.karaf.subsystem/org.apache.karaf.subsystem.core/${project.version}</bundle>
        </conditional>
    </feature>

    <feature name="docker" description="Docker service and commands" version="${project.version}">
        <details>Docker support providing service, commands, and MBean.</details>
        <bundle dependency="true">mvn:com.fasterxml.jackson.core/jackson-core/${jackson.version}</bundle>
        <bundle dependency="true">mvn:com.fasterxml.jackson.core/jackson-annotations/${jackson.version}</bundle>
        <bundle dependency="true">mvn:com.fasterxml.jackson.core/jackson-databind/${jackson.version}</bundle>
        <bundle>mvn:org.apache.karaf.docker/org.apache.karaf.docker.core/${project.version}</bundle>
    </feature>

</features>
