<?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-rest-example-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.4.0">

    <repository>mvn:org.apache.cxf.karaf/apache-cxf/${cxf.version}/xml/features</repository>
    <repository>mvn:org.apache.aries.jax.rs/org.apache.aries.jax.rs.features/1.0.3/xml</repository>
    
    <feature name="karaf-rest-example-common" version="${project.version}">
        <bundle>mvn:org.apache.karaf.examples/karaf-rest-example-api/${project.version}</bundle>
    </feature>

    <feature name="karaf-rest-example-provider" version="${project.version}">
        <feature version="${project.version}">karaf-rest-example-common</feature>
        <feature dependency="true">http</feature>
        <requirement>osgi.service;effective:=active;filter:=(objectClass=org.osgi.service.http.HttpService)</requirement>
        <feature dependency="true">aries-blueprint</feature>
        <feature version="${cxf.version}" dependency="true">cxf</feature>
        <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 dependency="true">mvn:com.fasterxml.jackson.jaxrs/jackson-jaxrs-base/${jackson.version}</bundle>
        <bundle dependency="true">mvn:com.fasterxml.jackson.jaxrs/jackson-jaxrs-json-provider/${jackson.version}</bundle>
        <bundle>mvn:org.apache.karaf.examples/karaf-rest-example-provider/${project.version}</bundle>
    </feature>

    <feature name="karaf-rest-example-client-http" version="${project.version}">
        <feature version="${project.version}">karaf-rest-example-provider</feature>
        <bundle>mvn:org.apache.karaf.examples/karaf-rest-example-client-http/${project.version}</bundle>
    </feature>
    
    <feature name="karaf-rest-example-client-cxf" version="${project.version}">
        <feature version="${project.version}">karaf-rest-example-provider</feature>
        <bundle>mvn:org.apache.karaf.examples/karaf-rest-example-client-cxf/${project.version}</bundle>
    </feature>

    <feature name="karaf-rest-example-whiteboard" version="${project.version}">
        <feature version="${project.version}">karaf-rest-example-common</feature>
        <feature>http-whiteboard</feature>
        <feature>aries-jax-rs-whiteboard</feature>
        <feature>aries-jax-rs-whiteboard-jackson</feature>
        <bundle>mvn:org.apache.karaf.examples/karaf-rest-example-whiteboard/${project.version}</bundle>
    </feature>

</features>
