<?xml version="1.0" encoding="UTF-8"?>
<!-- vi: set et smarttab sw=4 tabstop=4: -->
<!--
 Copyright © 2014, 2017 Cisco Systems, Inc. and others.  All rights reserved.

 This program and the accompanying materials are made available under the
 terms of the Eclipse Public License v1.0 which accompanies this distribution,
 and is available at http://www.eclipse.org/legal/epl-v10.html
-->
<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/xsd/maven-4.0.0.xsd">

    <parent>
        <groupId>org.opendaylight.odlparent</groupId>
        <artifactId>bundle-parent</artifactId>
        <version>9.0.13</version>
        <relativePath>../bundle-parent</relativePath>
    </parent>

    <modelVersion>4.0.0</modelVersion>
    <artifactId>features-test</artifactId>
    <packaging>bundle</packaging>
    <name>ODL :: odlparent :: ${project.artifactId}</name>

    <properties>
        <odlparent.spotbugs.enforce>false</odlparent.spotbugs.enforce>
    </properties>

    <dependencies>
        <!-- Dependencies for pax exam karaf container -->
        <dependency>
            <groupId>org.ops4j.pax.exam</groupId>
            <artifactId>pax-exam-container-karaf</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.ops4j.pax.exam</groupId>
            <artifactId>pax-exam-junit4</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.ops4j.pax.exam</groupId>
            <artifactId>pax-exam</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.ops4j.pax.url</groupId>
            <artifactId>pax-url-aether</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.osgi</groupId>
            <!-- required due to https://jira.opendaylight.org/browse/ODLPARENT-136 -->
            <artifactId>org.osgi.service.resolver</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.features</groupId>
            <artifactId>standard</artifactId>
            <version>${karaf.version}</version>
            <classifier>features</classifier>
            <type>xml</type>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.deployer</groupId>
            <artifactId>org.apache.karaf.deployer.blueprint</artifactId>
            <version>${karaf.version}</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.deployer</groupId>
            <artifactId>org.apache.karaf.deployer.features</artifactId>
            <version>${karaf.version}</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.ops4j.pax.url</groupId>
            <artifactId>pax-url-wrap</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.guicedee.services</groupId>
            <artifactId>javax.inject</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.framework</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.odlparent</groupId>
            <artifactId>opendaylight-karaf-empty</artifactId>
            <type>zip</type>
        </dependency>
        <!-- BEWARE of adding additional dependencies here...
             It will cause weird issues e.g. in integration/distribution/features/repos/distribution -->
        <dependency>
          <groupId>org.opendaylight.odlparent</groupId>
          <artifactId>karaf-util</artifactId>
          <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>bundles4-test</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.bundle</groupId>
            <artifactId>org.apache.karaf.bundle.core</artifactId>
            <version>${karaf.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
          <groupId>com.google.guava</groupId>
          <artifactId>guava</artifactId>
          <scope>compile</scope>
        </dependency>
        <!-- The following, which are just transitive dependencies of bundles4-test,
             have to be repeated here so that the Embed-Dependency below for maven-bundle-plugin works: -->
        <dependency>
          <groupId>org.hamcrest</groupId>
          <artifactId>hamcrest</artifactId>
          <scope>provided</scope>
        </dependency>
        <dependency>
          <groupId>org.awaitility</groupId>
          <artifactId>awaitility</artifactId>
          <scope>provided</scope>
          <exclusions>
            <exclusion>
              <groupId>cglib</groupId>
              <artifactId>cglib-nodep</artifactId>
            </exclusion>
            <exclusion>
              <groupId>org.objenesis</groupId>
              <artifactId>objenesis</artifactId>
            </exclusion>
          </exclusions>
        </dependency>
        <!-- Real <scope>test dependencies, just for SingleFeatureTestUnitTest -->
        <dependency>
          <groupId>com.google.truth</groupId>
          <artifactId>truth</artifactId>
          <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>
                    <Embed-Dependency>bundles4-test;inline=true,awaitility;inline=true,hamcrest;inline=true</Embed-Dependency>
                    <!-- same as in bundles4-test/pom.xml: -->
                    <Import-Package>!net.sf.cglib.proxy,!org.objenesis,*</Import-Package>
                  </instructions>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <executions>
                    <execution>
                        <id>check-license</id>
                        <configuration>
                            <excludes>
                                <!-- Skip Apache Licensed files -->
                                org/opendaylight/odlparent/featuretest/CustomBundleUrlStreamHandlerFactory.java
                            </excludes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>
