<?xml version="1.0" encoding="UTF-8"?>
<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">
    <parent>
        <groupId>org.opennms.features</groupId>
        <artifactId>org.opennms.features.flows</artifactId>
        <version>27.0.0-SNAPSHOT</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.opennms.features.flows</groupId>
    <artifactId>org.opennms.features.flows.itests</artifactId>
    <packaging>jar</packaging>
    <name>OpenNMS :: Features :: Flows :: Integration Tests</name>
    <properties>
        <skipITs>true</skipITs>
        <nephronVersion>0.1.1</nephronVersion>
        <jsonSimpleVersion>1.1.1</jsonSimpleVersion>
    </properties>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Bundle-RequiredExecutionEnvironment>JavaSE-1.8</Bundle-RequiredExecutionEnvironment>
                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
                        <Bundle-Version>${project.version}</Bundle-Version>
                    </instructions>
                </configuration>
            </plugin>
            <!-- We create a key for 'localhost' for test purposes -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>keytool-maven-plugin</artifactId>
                <version>1.5</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>generateKeyPair</goal>
                        </goals>
                        <phase>generate-test-resources</phase>
                    </execution>
                </executions>
                <configuration>
                    <workingDirectory>${project.build.directory}</workingDirectory>
                    <skipIfExist>true</skipIfExist>
                    <alias>localhost</alias>
                    <keysize>1024</keysize>
                    <keyalg>DSA</keyalg>
                    <dname>CN=localhost, OU=Flows baby flows, O=The OpenNMS Group, C=US</dname>
                    <keystore>${project.build.directory}/test-keystore.jks</keystore>
                    <storepass>password</storepass>
                    <validity>2</validity>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <dependencies>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.compendium</artifactId>
        </dependency>
        <dependency>
            <groupId>org.opennms.features.flows</groupId>
            <artifactId>org.opennms.features.flows.elastic</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.opennms.features.flows.classification.engine</groupId>
            <artifactId>org.opennms.features.flows.classification.engine.impl</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <!-- Override joda to match the version used by Beam in Nephron -->
            <groupId>joda-time</groupId>
            <artifactId>joda-time</artifactId>
            <version>2.10.5</version>
        </dependency>

        <dependency>
            <groupId>org.opennms.features.flows</groupId>
            <artifactId>org.opennms.features.flows.elastic</artifactId>
            <version>${project.version}</version>
            <classifier>tests</classifier>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.github.tomakehurst</groupId>
            <artifactId>wiremock</artifactId>
            <version>2.11.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.googlecode.json-simple</groupId>
            <artifactId>json-simple</artifactId>
            <version>${jsonSimpleVersion}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-library</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.jayway.awaitility</groupId>
            <artifactId>awaitility</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.opennms.core.test-api</groupId>
            <artifactId>org.opennms.core.test-api.lib</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.opennms.core.test-api</groupId>
            <artifactId>org.opennms.core.test-api.services</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.opennms</groupId>
            <artifactId>opennms-rrd-jrobin</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.opennms</groupId>
            <artifactId>opennms-rrdtool-api</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.opennms.features.collection</groupId>
            <artifactId>org.opennms.features.collection.persistence.rrd</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.opennms.core.test-api</groupId>
            <artifactId>org.opennms.core.test-api.db</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.opennms.nephron</groupId>
            <artifactId>nephron-main</artifactId>
            <version>${nephronVersion}</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.opennms.nephron</groupId>
                    <artifactId>nephron-proto</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.springframework</groupId>
                    <artifactId>spring-expression</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.springframework</groupId>
                    <artifactId>spring-core</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>commons-logging</groupId>
                    <artifactId>commons-logging</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.opennms</groupId>
            <artifactId>opennms-dao-mock</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.opennms.core.test-api</groupId>
            <artifactId>org.opennms.core.test-api.elasticsearch</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
        <!--
          A parent module defines netty-all with a specific version, but Elastic requires
          a different version. We overwrite it here manually so that the proper dependencies
          are pulled in.
        -->
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-all</artifactId>
            <version>${elasticsearchNettyVersion}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-codec</artifactId>
            <version>${elasticsearchNettyVersion}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-codec-http</artifactId>
            <version>${elasticsearchNettyVersion}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-transport</artifactId>
            <version>${elasticsearchNettyVersion}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-resolver</artifactId>
            <version>${elasticsearchNettyVersion}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-handler</artifactId>
            <version>${elasticsearchNettyVersion}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-buffer</artifactId>
            <version>${elasticsearchNettyVersion}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-common</artifactId>
            <version>${elasticsearchNettyVersion}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.opennms.elasticsearch</groupId>
            <artifactId>elasticsearch-drift-plugin</artifactId>
            <version>${elasticsearchTargetVersion}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.opennms.features.flows</groupId>
            <artifactId>org.opennms.features.flows.kafka-persistence</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.opennms.core.test-api</groupId>
            <artifactId>org.opennms.core.test-api.kafka</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <repositories>
        <repository>
            <id>sonatype.org-snapshot</id>
            <name>Sonatype OSS Snapshots Repository</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>
</project>
