<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">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.yamcs</groupId>
    <artifactId>yamcs</artifactId>
    <version>4.7.1</version>
    <relativePath>..</relativePath>
  </parent>

  <artifactId>yamcs-core</artifactId>
  <packaging>jar</packaging>
  <name>Yamcs Core</name>

  <dependencies>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>yamcs-api</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>yamcs-xtce</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.python</groupId>
      <artifactId>jython-standalone</artifactId>
      <version>2.7.1</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>io.netty</groupId>
      <artifactId>netty-handler</artifactId>
      <version>${nettyVersion}</version>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-jdk14</artifactId>
    </dependency>
    <dependency>
      <groupId>org.codehaus.janino</groupId>
      <artifactId>janino</artifactId>
      <version>2.5.15</version>
    </dependency>
    <dependency>
      <groupId>org.yaml</groupId>
      <artifactId>snakeyaml</artifactId>
      <version>1.9</version>
    </dependency>
    <dependency>
      <groupId>net.sourceforge.jexcelapi</groupId>
      <artifactId>jxl</artifactId>
      <version>2.6.12</version>
    </dependency>
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
      <version>18.0</version>
    </dependency>
    <dependency>
      <groupId>org.rocksdb</groupId>
      <artifactId>rocksdbjni</artifactId>
      <version>5.7.3</version>
    </dependency>
    <dependency>
       <groupId>io.dropwizard.metrics</groupId>
       <artifactId>metrics-core</artifactId>
       <version>4.0.3</version>
    </dependency>

  </dependencies>

  <build>
    <testResources>
      <testResource>
        <directory>${basedir}/src/test/resources</directory>
      </testResource>
      <testResource>
        <directory>${basedir}/etc</directory>
      </testResource>
    </testResources>
    <finalName>${project.artifactId}-${project.version}</finalName>
    <plugins>
      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <id>generate-version</id>
            <phase>process-sources</phase>
            <configuration>
              <tasks>
                <mkdir dir="target/generated-sources/version/org/yamcs" />
                <echo file="target/generated-sources/version/org/yamcs/YamcsVersion.java">
                  package org.yamcs;
                  public class YamcsVersion {
	                  public static final String version = "${project.version}";
                  }
                </echo>
              </tasks>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <forkCount>1</forkCount>
          <reuseForks>false</reuseForks>
          <systemProperties>
            <property>
              <name>java.util.logging.config.file</name>
              <value>${project.build.directory}/test-classes/logging.properties</value>
            </property>
          </systemProperties>
          <excludes>
            <exclude>**/RdbPerformanceTest.java</exclude>
            <exclude>**/*$*</exclude> <!-- this excludes the inner classes which causes maven to get stuck somehow -->
          </excludes>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>add-source</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>add-source</goal>
            </goals>
            <configuration>
              <sources>
                <source>target/generated-sources/version/</source>
              </sources>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
