<?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.ray</groupId>
    <artifactId>ray-superpom</artifactId>
    <version>0.1-SNAPSHOT</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>

  <artifactId>ray-tutorial</artifactId>

  <name>java tutorial</name>
  <description>Tutorial of using Ray with Java</description>

  <packaging>jar</packaging>

  <dependencies>
    <dependency>
      <groupId>org.ray</groupId>
      <artifactId>ray-api</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.ray</groupId>
      <artifactId>ray-runtime</artifactId>
      <version>${project.version}</version>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.20.1</version>
        <configuration>
          <environmentVariables>
            <RAY_CONFIG>${basedir}/../ray.config.ini</RAY_CONFIG>
          </environmentVariables>
          <argLine>-ea
            -Djava.library.path=${basedir}/../../build/src/plasma:${basedir}/../../build/src/ray/raylet
            -noverify
            -DlogOutput=console
          </argLine>
          <testSourceDirectory>${basedir}/src/main/java/</testSourceDirectory>
          <testClassesDirectory>${project.build.directory}/classes/</testClassesDirectory>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>copy-dependencies</id>
            <phase>package</phase>
            <goals>
              <goal>copy-dependencies</goal>
            </goals>
            <configuration>
              <outputDirectory>${basedir}/lib</outputDirectory>
              <overWriteReleases>false</overWriteReleases>
              <overWriteSnapshots>false</overWriteSnapshots>
              <overWriteIfNewer>true</overWriteIfNewer>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
