<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>com.eharmony</groupId>
        <artifactId>aloha</artifactId>
        <version>3.1.0</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <artifactId>aloha-h2o</artifactId>
    <packaging>jar</packaging>
    <name>${project.artifactId}</name>
    <description>Provides an Aloha model for H2o For more info, see http://h2o.ai</description>

    <url>${site.url}/${project.artifactId}</url>

    <distributionManagement>
        <site>
            <id>${site.deploy.id}</id>
            <!-- Note that GitHub does not like having leading slash here -->
            <url>${site.deploy.url}${project.artifactId}</url>
        </site>
    </distributionManagement>

    <properties>
        <h2o.version>3.6.0.3</h2o.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>com.eharmony</groupId>
            <artifactId>aloha-core</artifactId>
            <version>${project.version}</version>
        </dependency>

        <!-- For base64 decoding vw models. -->
        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
        </dependency>

        <dependency>
            <groupId>ai.h2o</groupId>
            <artifactId>h2o-core</artifactId>
            <version>${h2o.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>log4j</groupId>
                    <artifactId>log4j</artifactId>
                </exclusion>

                <!-- Use aloha's reflections:   org.reflections:reflections:0.9.9 -->
                <!-- Hopefully this won't screw anything up, but internal forks are usually not frivolous. -->
                <exclusion>
                    <groupId>ai.h2o</groupId>
                    <artifactId>reflections</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>ai.h2o</groupId>
            <artifactId>h2o-genmodel</artifactId>
            <version>${h2o.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>log4j</groupId>
                    <artifactId>log4j</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>com.github.scopt</groupId>
            <artifactId>scopt_${scala.major.version}</artifactId>
        </dependency>

        <!-- Test dependencies -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.eharmony</groupId>
            <artifactId>aloha-core</artifactId>
            <version>${project.version}</version>
            <classifier>tests</classifier>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>2.3</version>
                <executions>
                    <execution>
                        <id>copy-test-resources</id>
                        <phase>process-test-resources</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>target/test-classes</outputDirectory>
                            <encoding>UTF-8</encoding>
                            <resources>
                                <resource>
                                    <directory>src/test/resources</directory>
                                    <filtering>true</filtering>
                                    <includes>
                                        <include>mvn_gen_test.properties</include>
                                    </includes>
                                </resource>
                                <resource>
                                    <directory>src/test/resources</directory>
                                    <filtering>false</filtering>
                                    <excludes>
                                        <exclude>mvn_gen_test.properties</exclude>
                                    </excludes>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <!-- These two are necessary to make VwJniModelTest.testSerialization work with generated functions. -->
                    <forkMode>always</forkMode>
                    <additionalClasspathElements>
                        <additionalClasspathElement>${generated.classes.test}/</additionalClasspathElement>
                    </additionalClasspathElements>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
