<!--
  ~ /*
  ~  * Copyright 2015 Skymind,Inc.
  ~  *
  ~  *    Licensed under the Apache License, Version 2.0 (the "License");
  ~  *    you may not use this file except in compliance with the License.
  ~  *    You may obtain a copy of the License at
  ~  *
  ~  *        http://www.apache.org/licenses/LICENSE-2.0
  ~  *
  ~  *    Unless required by applicable law or agreed to in writing, software
  ~  *    distributed under the License is distributed on an "AS IS" BASIS,
  ~  *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~  *    See the License for the specific language governing permissions and
  ~  *    limitations under the License.
  ~  */
  ~
  -->

<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>nd4j-api-parent</artifactId>
        <groupId>org.nd4j</groupId>
        <version>1.0.0-beta</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>nd4j-api</artifactId>
    <version>1.0.0-beta</version>
    <packaging>jar</packaging>

    <name>nd4j-api</name>
    <url>http://nd4j.org</url>

    <build>
        <plugins>
            <plugin>
                <groupId>com.github.os72</groupId>
                <artifactId>protoc-jar-maven-plugin</artifactId>
                <version>3.5.1.1</version>
                <executions>
                    <execution>
                        <id>tensorflow</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <type>java-shaded</type>
                            <protocVersion>3.5.1</protocVersion>
                            <includeDirectories>
                                <include>src/main/protobuf/tf</include>
                            </includeDirectories>
                            <inputDirectories>
                                <include>src/main/protobuf/tf/tensorflow</include>
                            </inputDirectories>
                            <addSources>main</addSources>
                            <cleanOutputFolder>false</cleanOutputFolder>
                            <outputDirectory>src/main/java/</outputDirectory>
                        </configuration>
                    </execution>
                    <execution>
                        <id>onnx</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <type>java-shaded</type>
                            <extension>.proto3</extension>
                            <protocVersion>3.5.1</protocVersion>
                            <inputDirectories>
                                <include>src/main/protobuf/onnx</include>
                            </inputDirectories>
                            <addSources>main</addSources>
                            <cleanOutputFolder>false</cleanOutputFolder>
                            <outputDirectory>src/main/java/</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifest>
                            <addDefaultImplementationEntries>
                                true
                            </addDefaultImplementationEntries>
                        </manifest>
                    </archive>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>test-jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-classic</artifactId>
                <version>${logback.version}</version>
            </dependency>
            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-core</artifactId>
                <version>${logback.version}</version>
            </dependency>

        </dependencies>
    </dependencyManagement>


    <dependencies>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-math3</artifactId>
            <version>${commons-math3.version}</version>
        </dependency>
        <!-- Tensorflow import -->

        <!-- Note that this is a super minimal version of flatbuffers used by apache arrow.
        We use this one as so as not to clash with their version.-->
        <dependency>
            <groupId>com.vlkan</groupId>
            <artifactId>flatbuffers</artifactId>
            <version>${fbs.version}</version>
        </dependency>

        <!-- Note that this is shaded flatbuffers, see the protoc declaration above
        mentioning java-shaded as the type for why we use this instead of google's (mainly due ot other systems packaging
        their own older protobuf versions-->
        <dependency>
            <groupId>com.github.os72</groupId>
            <artifactId>protobuf-java-shaded-351</artifactId>
            <version>0.9</version>
        </dependency>
        <dependency>
            <groupId>com.github.os72</groupId>
            <artifactId>protobuf-java-util-shaded-351</artifactId>
            <version>0.9</version>
        </dependency>

        <dependency>
            <groupId>uk.com.robust-it</groupId>
            <artifactId>cloning</artifactId>
            <version>1.9.3</version>
        </dependency>


        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-core</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>

        <!-- Shaded version of Jackson -->
        <dependency>
            <groupId>org.nd4j</groupId>
            <artifactId>jackson</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>${lombok.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.nd4j</groupId>
            <artifactId>nd4j-buffer</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.nd4j</groupId>
            <artifactId>nd4j-context</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>net.ericaro</groupId>
            <artifactId>neoitertools</artifactId>
            <version>1.0.0</version>
            <exclusions>
                <exclusion>
                    <groupId>junit</groupId>
                    <artifactId>junit</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>testresources</id>
        </profile>
    </profiles>
</project>
