<?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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>ai.h2o</groupId>
        <artifactId>xgboost-jvm</artifactId>
        <version>0.7.2</version>
    </parent>
    <artifactId>xgboost4j</artifactId>
    <version>0.7.2</version>
    <packaging>jar</packaging>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.11</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.typesafe.akka</groupId>
            <artifactId>akka-actor_${scala.binary.version}</artifactId>
            <version>2.3.11</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.typesafe.akka</groupId>
            <artifactId>akka-testkit_${scala.binary.version}</artifactId>
            <version>2.3.11</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>no-lib</id>
            <activation>
                <property>
                    <name>exclude.xgboost.lib</name>
                    <value>true</value>
                </property>
            </activation>
            <properties>
                <excludeLibs>lib/*</excludeLibs>
            </properties>
        </profile>
    </profiles>

    <build>
      <resources>
          <resource>
              <directory>src/main/resources</directory>
              <excludes>
                  <exclude>${excludeLibs}</exclude>
              </excludes>
          </resource>
      </resources>
      <plugins>
          <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-javadoc-plugin</artifactId>
              <version>2.10.3</version>
              <configuration>
                  <show>protected</show>
                  <nohelp>true</nohelp>
              </configuration>
          </plugin>
          <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-assembly-plugin</artifactId>
              <configuration>
                  <skipAssembly>false</skipAssembly>
              </configuration>
          </plugin>
          <plugin>
              <artifactId>exec-maven-plugin</artifactId>
              <groupId>org.codehaus.mojo</groupId>
              <executions>
                  <execution>
                      <id>native</id>
                      <phase>generate-sources</phase>
                      <goals>
                          <goal>exec</goal>
                      </goals>
                      <configuration>
                          <executable>python</executable>
                          <arguments>
                            <argument>create_jni.py</argument>
                          </arguments>
                          <workingDirectory>${user.dir}</workingDirectory>
                      </configuration>
                  </execution> 
                  <!--
                  <execution>
                      <id>extractLibs</id>
                      <phase>package</phase>
                      <goals>
                          <goal>exec</goal>
                      </goals>
                      <configuration>
                          <executable>./extract_jars.sh</executable>
                          <arguments>
                              <argument>xgboost4j/target/${project.build.finalName}.${project.packaging}</argument>
                              <argument>${extractLibs.suffix}</argument>
                          </arguments>
                          <workingDirectory>${user.dir}</workingDirectory>
                      </configuration>
                  </execution>-->
              </executions>
          </plugin>
      </plugins>
    </build>
</project>
