<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ /* ******************************************************************************
  ~  *
  ~  *
  ~  * This program and the accompanying materials are made available under the
  ~  * terms of the Apache License, Version 2.0 which is available at
  ~  * https://www.apache.org/licenses/LICENSE-2.0.
  ~  *
  ~  *  See the NOTICE file distributed with this work for additional
  ~  *  information regarding copyright ownership.
  ~  * 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.
  ~  *
  ~  * SPDX-License-Identifier: Apache-2.0
  ~  ******************************************************************************/
  -->

<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>org.eclipse.deeplearning4j</groupId>
        <artifactId>deeplearning4j</artifactId>
        <version>1.0.0-SNAPSHOT</version>
    </parent>

    <groupId>org.eclipse.deeplearning4j</groupId>
    <artifactId>nd4j</artifactId>
    <packaging>pom</packaging>

    <name>nd4j</name>


    <modules>
        <module>nd4j-shade</module>
        <module>nd4j-serde</module>
        <module>nd4j-common</module>
        <module>nd4j-backends</module>
        <module>nd4j-tensorflow</module>
        <module>nd4j-tensorflow-lite</module>
        <module>nd4j-onnxruntime</module>
        <module>nd4j-tvm</module>
        <module>samediff-import</module>
        <module>nd4j-web</module>

    </modules>

    <profiles>
        <profile>
            <id>profiler</id>
            <modules>
                <module>nd4j-profiler</module>
            </modules>
        </profile>
        <profile>
            <id>platform-tests</id>
            <modules>
                <module>nd4j-common-tests</module>
            </modules>
        </profile>
    </profiles>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-classic</artifactId>
                <version>${logback.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${slf4j.version}</version>
            </dependency>
            <!-- Redirect jackson to slf4j.  -->
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>log4j-over-slf4j</artifactId>
                <version>${slf4j.version}</version>
            </dependency>
            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-core</artifactId>
                <version>${logback.version}</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-log4j12</artifactId>
                <version>${slf4j.version}</version>
            </dependency>
            <dependency>
                <groupId>org.eclipse.deeplearning4j</groupId>
                <artifactId>nd4j-native-api</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.eclipse.deeplearning4j</groupId>
                <artifactId>nd4j-api</artifactId>
                <version>${project.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>



    <build>
        <extensions>
            <extension>
                <groupId>org.kuali.maven.wagons</groupId>
                <artifactId>maven-s3-wagon</artifactId>
                <version>1.2.1</version>
            </extension>
        </extensions>

        <plugins>
            <!-- Configuration for git-commit-id plugin - used with ND4J version check functionality -->
            <plugin>
                <groupId>pl.project13.maven</groupId>
                <artifactId>git-commit-id-plugin</artifactId>
            </plugin>
            <!-- Add generated git.properties files resource directory, for output of git-commit-id plugin -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.0.2</version>
                <configuration>
                    <includes>
                        <include>**/*.so</include>
                        <include>**/*.pb</include>
                        <include>**/*.pbtxt</include>
                        <include>**/*.so.*</include>
                        <include>META-INF/*</include>
                        <include>META-INF/services/**</include>
                        <include>org.*</include>
                        <include>**/*.properties</include>
                        <include>**/*.json</include>
                        <include>**/*.proto</include>
                        <include>**/*.class</include>
                        <include>**/*.dll</include>
                        <include>**/*.dylib</include>
                        <include>lib/*</include>
                    </includes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>net.revelc.code.formatter</groupId>
                <artifactId>formatter-maven-plugin</artifactId>
                <version>2.12.1</version>

                <configuration>
                    <directories>
                        <directory>nd4j-shade</directory>
                        <directory>nd4j-jdbc</directory>
                        <directory>nd4j-serde</directory>
                        <directory>nd4j-common</directory>
                        <directory>nd4j-buffer</directory>
                        <directory>nd4j-context</directory>
                        <directory>nd4j-parameter-server-parent</directory>
                        <directory>nd4j-uberjar</directory>
                        <directory>nd4j-backends/nd4j-api-parent</directory>
                    </directories>
                </configuration>
            </plugin>
        </plugins>

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.eclipse.m2e</groupId>
                    <artifactId>lifecycle-mapping</artifactId>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-toolchains-plugin</artifactId>
                    <version>1.1</version>
                    <configuration>
                        <toolchains>
                            <jdk>
                                <version>1.9</version>
                                <vendor>oracle</vendor>
                            </jdk>
                        </toolchains>
                    </configuration>
                    <executions>
                        <execution>
                            <goals>
                                <goal>toolchain</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

</project>
