<?xml version="1.0"?>
<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>
    <artifactId>org.opennms.features</artifactId>
    <groupId>org.opennms</groupId>
    <version>17.0.1-SNAPSHOT</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.opennms.features</groupId>
  <artifactId>newts-repository-converter</artifactId>
  <name>RRD / JRobin to NewTS Conversion/Migration Tool</name>
  <packaging>jar</packaging>
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <skipITs>true</skipITs>
  </properties>
  <dependencies>
    <dependency>
      <groupId>org.opennms.core</groupId>
      <artifactId>org.opennms.core.db</artifactId>
    </dependency>
    <dependency>
      <groupId>org.opennms.dependencies</groupId>
      <artifactId>jrobin-dependencies</artifactId>
      <type>pom</type>
    </dependency>
    <dependency>
      <groupId>org.opennms</groupId>
      <artifactId>opennms-rrd-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.opennms</groupId>
      <artifactId>opennms-rrd-model</artifactId>
    </dependency>
    <dependency>
      <groupId>org.opennms</groupId>
      <artifactId>opennms-rrdtool-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.opennms</groupId>
      <artifactId>opennms-rrd-jrobin</artifactId>
    </dependency>
    <dependency>
      <groupId>org.opennms.core</groupId>
      <artifactId>org.opennms.core.logging</artifactId>
    </dependency>
    <dependency>
      <groupId>org.opennms.features</groupId>
      <artifactId>org.opennms.features.newts</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>commons-cli</groupId>
      <artifactId>commons-cli</artifactId>
    </dependency>
    <dependency>
      <groupId>joda-time</groupId>
      <artifactId>joda-time</artifactId>
    </dependency>
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
      <!-- The embedded Cassandra server used for integration testing requires a newer
           version of Guava. Since we can't have different versions of the artifacts in
           the compile and test scope, we use a newer version here, and mark it as provided -->
      <version>19.0</version>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.12</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.opennms</groupId>
      <artifactId>opennms-test</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.opennms</groupId>
      <artifactId>opennms-dao</artifactId>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.opennms</groupId>
      <artifactId>opennms-dao</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.hamcrest</groupId>
	  <artifactId>hamcrest-library</artifactId>
	  <version>1.3</version>
	  <scope>test</scope>
	</dependency>
    <dependency>
      <groupId>org.opennms.newts</groupId>
      <artifactId>newts-cassandra-test</artifactId>
      <version>${newtsVersion}</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <groupId>org.slf4j</groupId>
          <artifactId>slf4j-log4j12</artifactId>
        </exclusion>
        <exclusion>
          <groupId>com.sun.xml.bind</groupId>
          <artifactId>jaxb-impl</artifactId>
        </exclusion>
        <exclusion>
          <groupId>log4j</groupId>
          <artifactId>log4j</artifactId>
        </exclusion>
        <exclusion>
          <groupId>ch.qos.logback</groupId>
          <artifactId>logback-core</artifactId>
        </exclusion>
        <exclusion>
          <groupId>ch.qos.logback</groupId>
          <artifactId>logback-classic</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.hamcrest</groupId>
          <artifactId>hamcrest-library</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>com.github.stefanbirkner</groupId>
      <artifactId>system-rules</artifactId>
      <version>1.5.0</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifest>
              <addClasspath>true</addClasspath>
              <mainClass>org.opennms.features.newts.converter.NewtsConverter</mainClass>
            </manifest>
          </archive>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-failsafe-plugin</artifactId>
        <configuration>
          <skipITs>${skipITs}</skipITs>
          <argLine>-Xmx1g -Djava.endorsed.dirs=${basedir}/target/endorsed</argLine>
          <systemPropertyVariables>
            <opennms.home>${project.build.testOutputDirectory}</opennms.home>
            <java.endorsed.dirs>${basedir}/target/endorsed</java.endorsed.dirs>
          </systemPropertyVariables>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>integration-test</goal>
              <goal>verify</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
