<?xml version="1.0" encoding="UTF-8"?>
<project
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://maven.apache.org/POM/4.0.0"
    xsi:schemaLocation="
        http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd
">
  <parent>
    <groupId>org.opennms.netmgt.sample</groupId>
    <artifactId>sample-parent</artifactId>
    <version>16.0.0-PJSM-SNAPSHOT</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>integration-tests</artifactId>
  <name>Minion :: Integration Tests</name>


  <properties>
    <!--
      We have to set it here again because the root paxExamVersion is
      completely different and we do not want to mess with that property.
    -->
    <pax.exam.version>4.3.0</pax.exam.version>
  </properties>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>unpack</id>
            <phase>process-test-classes</phase>
            <goals>
              <goal>unpack</goal>
            </goals>
            <configuration>
              <artifactItems>
                This is our SMNNEPO repository
                <artifactItem>
                  <groupId>org.opennms.netmgt.sample</groupId>
                  <artifactId>sampler-repo</artifactId>
                  <version>${project.version}</version>
                  <type>tar.gz</type>
                  <classifier>repo</classifier>
                  <overWrite>true</overWrite>
                  <outputDirectory>target/paxexam/opennms-repo</outputDirectory>
                </artifactItem>
              </artifactItems>
            </configuration>
          </execution>
          <execution>
            <id>copy</id>
            <phase>process-test-classes</phase>
            <goals>
              <goal>copy-dependencies</goal>
            </goals>
            <configuration>
              <useRepositoryLayout>true</useRepositoryLayout>
              <excludeTypes>tar.gz</excludeTypes>
              <excludeGroupIds>org.opennms</excludeGroupIds>
              <outputDirectory>target/paxexam/test-repo</outputDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.servicemix.tooling</groupId>
        <artifactId>depends-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>generate-depends-file</id>
            <goals>
              <goal>generate-depends-file</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <systemPropertyVariables>
            <karafVersion>${karafVersion}</karafVersion>
            <project.version>${project.version}</project.version>
          </systemPropertyVariables>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <dependencies>
    <!--<dependency>-->
    <!--<groupId>org.opennms.netmgt.sample</groupId>-->
    <!--<artifactId>karaf</artifactId>-->
    <!--<version>${project.version}</version>-->
    <!--<type>xml</type>-->
    <!--<scope>test</scope>-->
    <!--</dependency>-->
    <dependency>
      <groupId>org.apache.karaf.itests</groupId>
      <artifactId>itests</artifactId>
      <version>${karafVersion}</version>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.ops4j.pax.exam</groupId>
      <artifactId>pax-exam-container-karaf</artifactId>
      <version>${pax.exam.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.ops4j.pax.exam</groupId>
      <artifactId>pax-exam</artifactId>
      <version>${pax.exam.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.ops4j.pax.exam</groupId>
      <artifactId>pax-exam-junit4</artifactId>
      <version>${pax.exam.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.karaf</groupId>
      <artifactId>apache-karaf</artifactId>
      <version>${karafVersion}</version>
      <type>tar.gz</type>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <groupId>commons-logging</groupId>
          <artifactId>commons-logging</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.springframework</groupId>
          <artifactId>spring-aop</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.springframework</groupId>
          <artifactId>spring-asm</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.springframework</groupId>
          <artifactId>spring-beans</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.springframework</groupId>
          <artifactId>spring-context</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.springframework</groupId>
          <artifactId>spring-core</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.springframework</groupId>
          <artifactId>spring-expression</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.opennms.dependencies</groupId>
      <artifactId>spring-dependencies</artifactId>
      <type>pom</type>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.ops4j.pax.url</groupId>
      <artifactId>pax-url-aether</artifactId>
      <version>1.6.0</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <groupId>commons-logging</groupId>
          <artifactId>commons-logging</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>javax.inject</groupId>
      <artifactId>javax.inject</artifactId>
      <version>1</version>
      <scope>test</scope>
    </dependency>

    <!--
      These dependencies are required to fake the test-repo
      to get the exam stuff working inside the karaf container
    -->
    <dependency>
      <groupId>org.ops4j.base</groupId>
      <artifactId>ops4j-base-monitors</artifactId>
      <version>1.5.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.ops4j.base</groupId>
      <artifactId>ops4j-base-io</artifactId>
      <version>1.5.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.ops4j.base</groupId>
      <artifactId>ops4j-base-net</artifactId>
      <version>1.5.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.ops4j.pax.swissbox</groupId>
      <artifactId>pax-swissbox-core</artifactId>
      <version>1.8.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.ops4j.pax.swissbox</groupId>
      <artifactId>pax-swissbox-framework</artifactId>
      <version>1.8.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.ops4j.pax.swissbox</groupId>
      <artifactId>pax-swissbox-extender</artifactId>
      <version>1.8.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.ops4j.pax.tipi</groupId>
      <artifactId>org.ops4j.pax.tipi.hamcrest.core</artifactId>
      <version>1.3.0.1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.ops4j.pax.tipi</groupId>
      <artifactId>org.ops4j.pax.tipi.junit</artifactId>
      <version>4.11.0.1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.ops4j.pax.exam</groupId>
      <artifactId>pax-exam-features</artifactId>
      <version>${pax.exam.version}</version>
      <type>xml</type>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.ops4j.pax.exam</groupId>
      <artifactId>pax-exam-extender-service</artifactId>
      <version>${pax.exam.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.ops4j.pax.exam</groupId>
      <artifactId>pax-exam-invoker-junit</artifactId>
      <version>${pax.exam.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.ops4j.pax.exam</groupId>
      <artifactId>pax-exam-inject</artifactId>
      <version>${pax.exam.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
</project>
