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

     Copyright 2005-2015 Red Hat, Inc.

     Red Hat 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.

-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>io.fabric8</groupId>
        <artifactId>fabric-project</artifactId>
        <version>1.2.0.redhat-133</version>
    </parent>

    <artifactId>fabric-maven</artifactId>
    <packaging>bundle</packaging>

    <name>Fabric8 :: Maven Bundle</name>

    <dependencies>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>
        <dependency>
            <groupId>biz.aQute.bnd</groupId>
            <artifactId>bndlib</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.maven.wagon</groupId>
            <artifactId>wagon-provider-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-aether-provider</artifactId>
        </dependency>
        <dependency>
            <groupId>org.eclipse.aether</groupId>
            <artifactId>aether-connector-wagon</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.apache.maven.wagon</groupId>
                    <artifactId>wagon-provider-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpcore</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
        </dependency>
        <dependency>
            <groupId>org.sonatype.plexus</groupId>
            <artifactId>plexus-cipher</artifactId>
        </dependency>
        <dependency>
            <groupId>org.sonatype.plexus</groupId>
            <artifactId>plexus-sec-dispatcher</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.wagon</groupId>
            <artifactId>wagon-file</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.wagon</groupId>
            <artifactId>wagon-http</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-settings-builder</artifactId>
        </dependency>
        <dependency>
            <groupId>org.eclipse.sisu</groupId>
            <artifactId>org.eclipse.sisu.plexus</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.xbean</groupId>
            <artifactId>xbean-reflect</artifactId>
            <version>${xbean-reflect-version}</version>
        </dependency>

        <dependency>
            <groupId>io.fabric8</groupId>
            <artifactId>common-util</artifactId>
        </dependency>

        <dependency>
            <groupId>org.ops4j.base</groupId>
            <artifactId>ops4j-base-util-property</artifactId>
        </dependency>

        <dependency>
            <groupId>org.ops4j.base</groupId>
            <artifactId>ops4j-base-lang</artifactId>
        </dependency>

        <dependency>
            <groupId>org.ops4j.pax.url</groupId>
            <artifactId>pax-url-commons</artifactId>
        </dependency>

        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.compendium</artifactId>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <systemPropertyVariables>
                        <karaf-version>${karaf-version}</karaf-version>
                    </systemPropertyVariables>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <configuration>
                    <instructions>
                        <Import-Package>
                            javax.inject.*;
                            javax.enterprise.inject.*;
                            resolution:=optional,
                            javax.*,
                            io.fabric8.common.util.*,
                            org.osgi.*,
                            org.slf4j.*,
                            org.ops4j.util.property.*,
                            org.apache.commons.lang.*,
                            org.apache.commons.logging.*,
                            org.apache.commons.codec.*,
                            org.apache.commons.codec.binary.*
                        </Import-Package>
                        <Export-Package>
                            io.fabric8.maven*;version=${project.version},
                            org.eclipse.*,
                            org.apache.maven.*;version=${maven-version};-split-package:=merge-first,
                            org.codehaus.*
                        </Export-Package>
                        <Private-Package>
                            org.apache.http*,
                            org.sonatype.plexus.components.cipher.*,
                            org.sonatype.plexus.components.sec.*
                        </Private-Package>
                        <Provide-Capability>
                            osgi.service;effective:=active;objectClass="io.fabric8.maven.MavenResolver",
                            osgi.service;effective:=active;objectClass="org.osgi.service.url.URLStreamHandlerService";url.handler.protocol=mvn
                        </Provide-Capability>
                        <Bundle-Activator>io.fabric8.maven.url.internal.Activator</Bundle-Activator>
                    </instructions>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>
