<?xml version="1.0" encoding="UTF-8"?>
<!--
 Copyright © 2017 Red Hat, 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">
  <modelVersion>4.0.0</modelVersion>

  <parent>
      <groupId>org.opendaylight.infrautils</groupId>
      <artifactId>parent</artifactId>
      <version>1.3.2</version>
      <relativePath>../../common/parent</relativePath>
  </parent>

  <artifactId>ready-impl</artifactId>
  <packaging>bundle</packaging>
  <!-- <name> formatting is used by autorelease to parse and notify projects on
       build failure. Please do not modify this unless you have a good reason. -->
  <name>ODL :: infrautils :: ${project.artifactId}</name>

  <dependencies>
    <dependency>
      <groupId>org.osgi</groupId>
      <artifactId>org.osgi.core</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.opendaylight.infrautils</groupId>
      <artifactId>ready-api</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.opendaylight.odlparent</groupId>
      <artifactId>bundles-test-lib</artifactId>
      <version>3.1.0</version>
      <exclusions>
        <!-- TODO Remove karaf-util exclusion from here once https://git.opendaylight.org/gerrit/#/c/61489/ is in odlparent (and we have a release with it we're using here) -->
        <exclusion>
          <groupId>org.opendaylight.odlparent</groupId>
          <artifactId>karaf-util</artifactId>
        </exclusion>
      </exclusions>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.opendaylight.infrautils</groupId>
      <artifactId>infrautils-util</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.karaf.bundle</groupId>
      <artifactId>org.apache.karaf.bundle.core</artifactId>
      <!-- karaf.version & karaf4.version are API compatible (for karaf.bundle.core) -->
      <version>${karaf.version}</version>
      <scope>provided</scope>
    </dependency>
    <!-- We HAVE to list hamcrest and awaitility as dependencies here,
         not because we need to compile against it, but so that the Embed-Dependency
         in the maven-bundle-plugin below works! -->
    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest-core</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.awaitility</groupId>
      <artifactId>awaitility</artifactId>
      <scope>compile</scope>
      <exclusions>
        <exclusion>
          <groupId>cglib</groupId>
          <artifactId>cglib-nodep</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.objenesis</groupId>
          <artifactId>objenesis</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>javax.inject</groupId>
      <artifactId>javax.inject</artifactId>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.ops4j.pax.cdi</groupId>
      <artifactId>pax-cdi-api</artifactId>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.opendaylight.infrautils</groupId>
      <artifactId>infrautils-testutils</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>com.google.truth</groupId>
      <artifactId>truth</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <configuration>
          <instructions>
            <Embed-Dependency>bundles-test-lib,awaitility,hamcrest-core</Embed-Dependency>
            <!-- Do NOT <Embed-Transitive>true</Embed-Transitive> -->
            <!-- We must tweak karaf.bundle.core's version range so that it works both in Karaf 3 and Karaf 4 -->
            <Import-Package>!net.sf.cglib.proxy,!org.objenesis,org.apache.karaf.bundle.core;version="[3.0,5)",*</Import-Package>
          </instructions>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.aries.blueprint</groupId>
        <artifactId>blueprint-maven-plugin</artifactId>
      </plugin>
    </plugins>
  </build>
</project>
