<!--

     Copyright 2005-2014 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.fab</groupId>
        <artifactId>fab-project</artifactId>
        <version>1.2.0.Beta2</version>
    </parent>

    <artifactId>fab-osgi</artifactId>
    <packaging>bundle</packaging>

    <name>Fabric8 :: FAB (deprecated) :: OSGi</name>

    <properties>
        <fuse.osgi.embed.dependency>*;scope=compile|runtime;artifactId=!*console*,maven-bundle-plugin</fuse.osgi.embed.dependency>

        <fuse.osgi.import.defaults>
        </fuse.osgi.import.defaults>
        <fuse.osgi.import.before.defaults/>
        <fuse.osgi.import.additional/>
        <fuse.osgi.import.pkg>
            !com.google.common.collect,
            !org.apache.maven.*,
            !org.codehaus.plexus.*,
            !org.codehaus.classworlds*,
            !org.ops4j.pax.swissbox.bnd,
            !org.ops4j.pax.url.commons,
            !aQute.lib.osgi.*,
            <!-- don't import additional packages required by other class in maven-bundle-plugin -->
            !org.apache.velocity.*,
            !org.codehaus.doxia.*,
            !org.apache.felix.bundlerepository.*,
            !org.kxml2.*,
            !org.xmlpull.*,
            !junit.*,
            !org.sonatype.plexus.components.cipher,
            !org.sonatype.plexus.components.sec.dispatcher,
            !org.osgi.service.http,
            !javax.servlet*,
            org.osgi.service.event;resolution:=optional,
            org.apache.commons.logging.*;version="[1.0,2.0)",
            *
        </fuse.osgi.import.pkg>
        <fuse.osgi.private.pkg>
            io.fabric8.maven.util;-split-package:=first
        </fuse.osgi.private.pkg>
        <fuse.osgi.export>
            io.fabric8.fab*;version=${fuse.osgi.version};-noimport:=true,
            org.codehaus.plexus*;-noimport:=true,
            org.sonatype.aether*;-noimport:=true,
            aQute.lib.osgi*;-noimport:=true,
        </fuse.osgi.export>
    </properties>

    <dependencies>
        <dependency>
            <groupId>io.fabric8</groupId>
            <artifactId>common-util</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.compendium</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.framework</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.fileinstall</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.features</groupId>
            <artifactId>org.apache.karaf.features.core</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.shell</groupId>
            <artifactId>org.apache.karaf.shell.console</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.shell</groupId>
            <artifactId>org.apache.karaf.shell.osgi</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- We will 'borrow' the bnd Analyzer for Blueprint files from Felix' maven-bundle-plugin -->
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>maven-bundle-plugin</artifactId>
            <version>${maven-bundle-plugin-version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.utils</artifactId>
        </dependency>

        <dependency>
            <groupId>io.fabric8.fab</groupId>
            <artifactId>fab-core</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.ops4j.pax.url</groupId>
            <artifactId>pax-url-commons</artifactId>
            <version>${pax.url.version}</version>
        </dependency>

        <!-- Embeded dependencies (not transitive) -->
        <dependency>
            <groupId>org.ops4j.base</groupId>
            <artifactId>ops4j-base-net</artifactId>
            <version>${ops4j-base.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.ops4j.pax.swissbox</groupId>
            <artifactId>pax-swissbox-optional-jcl</artifactId>
            <version>${ops4j-pax-swissbox-optional-jcl.version}</version>
            <scope>provided</scope>
        </dependency>
        <!--
        <dependency>
          <groupId>org.ops4j.pax.swissbox</groupId>
          <artifactId>pax-swissbox-bnd</artifactId>
          <version>${ops4j-pax-swissbox-bnd.version}</version>
        </dependency>
        -->
        <!-- transitive dependencies -->
        <dependency>
            <groupId>biz.aQute.bnd</groupId>
            <artifactId>bndlib</artifactId>
            <version>${bndlib-version}</version>
        </dependency>

        <!-- aether stuff -->
        <dependency>
            <groupId>org.sonatype.aether</groupId>
            <artifactId>aether-api</artifactId>
            <version>${aether-version}</version>
        </dependency>
        <dependency>
            <groupId>org.sonatype.aether</groupId>
            <artifactId>aether-spi</artifactId>
            <version>${aether-version}</version>
        </dependency>
        <dependency>
            <groupId>org.sonatype.aether</groupId>
            <artifactId>aether-util</artifactId>
            <version>${aether-version}</version>
        </dependency>
        <dependency>
            <groupId>org.sonatype.aether</groupId>
            <artifactId>aether-impl</artifactId>
            <version>${aether-version}</version>
        </dependency>
        <dependency>
            <groupId>org.sonatype.aether</groupId>
            <artifactId>aether-connector-wagon</artifactId>
            <version>${aether-version}</version>
            <!-- clashes with guava -->
            <exclusions>
                <exclusion>
                    <groupId>com.google.collections</groupId>
                    <artifactId>google-collections</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.xbean</groupId>
            <artifactId>xbean-reflect</artifactId>
            <version>${xbean-reflect-version}</version>
        </dependency>        
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-aether-provider</artifactId>
            <version>${maven-version}</version>
        </dependency>

        <!-- expanded transitive dependencies -->
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-model-builder</artifactId>
            <version>${maven-version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-model</artifactId>
            <version>${maven-version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-repository-metadata</artifactId>
            <version>${maven-version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-settings-builder</artifactId>
            <version>${maven-version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-settings</artifactId>
            <version>${maven-version}</version>
        </dependency>
        <dependency>
            <groupId>org.sonatype.plexus</groupId>
            <artifactId>plexus-sec-dispatcher</artifactId>
            <version>1.3</version>
        </dependency>
        <dependency>
            <groupId>org.sonatype.plexus</groupId>
            <artifactId>plexus-cipher</artifactId>
            <version>1.4</version>
        </dependency>
        <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-interpolation</artifactId>
            <version>1.14</version>
        </dependency>
        <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-component-annotations</artifactId>
            <version>1.5.5</version>
        </dependency>
        <!--
       <dependency>
          <groupId>org.codehaus.plexus</groupId>
          <artifactId>plexus-container</artifactId>
          <version>1.5.5</version>
        </dependency>
        -->

        <dependency>
            <groupId>org.apache.maven.wagon</groupId>
            <artifactId>wagon-provider-api</artifactId>
            <version>1.0-beta-6</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.wagon</groupId>
            <artifactId>wagon-file</artifactId>
            <version>1.0-beta-6</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.wagon</groupId>
            <artifactId>wagon-http-lightweight</artifactId>
            <version>1.0-beta-6</version>
            <exclusions>
                <exclusion>
                    <groupId>nekohtml</groupId>
                    <artifactId>nekohtml</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>nekohtml</groupId>
                    <artifactId>xercesMinimal</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-utils</artifactId>
            <version>1.5.9</version>
        </dependency>

        <!-- test dependencies -->
        <dependency>
            <groupId>org.easymock</groupId>
            <artifactId>easymock</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.ops4j.pax.tinybundles</groupId>
            <artifactId>tinybundles</artifactId>
            <version>${tinybundles-version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>

        <plugins>
          <plugin>
              <groupId>org.apache.felix</groupId>
              <artifactId>maven-bundle-plugin</artifactId>
              <configuration>
                  <instructions>
                      <Gravia-Enabled>true</Gravia-Enabled>
                  </instructions>
              </configuration>
          </plugin>
        </plugins>
    </build>

    <repositories>
        <repository>
            <id>aQute</id>
            <url>http://www.aQute.biz/repo</url>
        </repository>
    </repositories>
</project>
