<!--
  Copyright (C) FuseSource, Inc.
  http://fusesource.com

  Licensed 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>org.fusesource.fabric.fab</groupId>
        <artifactId>fab-project</artifactId>
        <version>7.2.0.redhat-060</version>
        <relativePath>..</relativePath>
    </parent>

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

    <name>${project.artifactId}</name>
    <description>Fuse Application Bundles :: OSGi</description>

    <properties>
        <fuse.osgi.embed.dependency>*;scope=compile|runtime;artifactId=!*console*</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>
            org.fusesource.fabric.*;${fuse.osgi.import.fabric.version},
            !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.felix.bundlerepository.*,
            !org.kxml2.*,
            !org.xmlpull.*,
            !junit.*,
            org.osgi.service.event;resolution:=optional,
            *
        </fuse.osgi.import.pkg>
        <fuse.osgi.export>
            org.fusesource.fabric.*;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>org.fusesource.fabric</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>

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

        <dependency>
            <groupId>org.fusesource.fabric.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>
        <dependency>
            <groupId>org.ops4j.pax.url</groupId>
            <artifactId>pax-url-mvn</artifactId>
            <version>${pax.url.mvn.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</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>
        </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.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>
        </dependency>
        <dependency>
            <groupId>org.ops4j.pax.tinybundles</groupId>
            <artifactId>tinybundles</artifactId>
            <version>${tinybundles-version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <excludes>
                        <!-- TODO fix this when we've a sample... -->
                        <exclude>**/PomegranateSampleTest.*</exclude>
                    </excludes>
                </configuration>
            </plugin>

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

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