<?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>

    <groupId>com.bc.zarr</groupId>
    <artifactId>jzarr</artifactId>
    <version>0.3.3</version>

    <properties>
        <!-- needed in test scope to show examples -->
        <nd4j.version>1.0.0-beta4</nd4j.version>
        <nd4j.backend>nd4j-native-platform</nd4j.backend>
    </properties>

    <dependencies>

        <!-- #################### -->
        <!-- # scope production # -->
        <!-- #################### -->

        <dependency>
            <groupId>edu.ucar</groupId>
            <artifactId>cdm-core</artifactId>
            <version>5.3.3</version>
        </dependency>

        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>2.11.3</version>
        </dependency>

        <dependency>
            <groupId>org.lasersonlab</groupId>
            <artifactId>jblosc</artifactId>
            <version>1.0.1</version>
        </dependency>
        <!--        <dependency>-->
        <!--            <groupId>org.blosc</groupId>-->
        <!--            <artifactId>jblosc</artifactId>-->
        <!--            <version>1.0.1-BC</version>-->
        <!--        </dependency>-->

        <!-- ############## -->
        <!-- # scope test # -->
        <!-- ############## -->

        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>2.8.5</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-all</artifactId>
            <version>1.3</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.13.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.google.jimfs</groupId>
            <artifactId>jimfs</artifactId>
            <version>1.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.nd4j</groupId>
            <artifactId>nd4j-api</artifactId>
            <version>${nd4j.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.nd4j</groupId>
            <artifactId>${nd4j.backend}</artifactId>
            <version>${nd4j.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <version>3.19.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.lasersonlab</groupId>
            <artifactId>s3fs</artifactId>
            <version>2.2.3</version>
            <exclusions>
                <exclusion>
                    <groupId>com.fasterxml.jackson.core</groupId>
                    <artifactId>jackson-databind</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.fasterxml.jackson.dataformat</groupId>
                    <artifactId>jackson-dataformat-cbor</artifactId>
                </exclusion>
            </exclusions>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <distributionManagement>
        <repository>
            <id>bc-nexus-repo</id>
            <name>Public Maven Repository for BC</name>
            <url>http://nexus.senbox.net/nexus/content/repositories/releases/</url>
            <uniqueVersion>false</uniqueVersion>
        </repository>
        <snapshotRepository>
            <id>bc-nexus-repo</id>
            <name>Public Maven Snapshot Repository for BC</name>
            <url>http://nexus.senbox.net/nexus/content/repositories/snapshots/</url>
            <uniqueVersion>false</uniqueVersion>
        </snapshotRepository>
    </distributionManagement>

    <repositories>
        <repository>
            <id>snap-repo-public</id>
            <name>Public Maven Repository for SNAP</name>
            <url>https://snap-build-server.tilaa.cloud/nexus/repository/snap-maven-public/</url>
            <releases>
                <enabled>true</enabled>
                <checksumPolicy>warn</checksumPolicy>
            </releases>
            <snapshots>
                <enabled>true</enabled>
                <checksumPolicy>warn</checksumPolicy>
            </snapshots>
        </repository>
    </repositories>

    <build>
        <plugins>
            <!--            <plugin>-->
            <!--                <groupId>org.codehaus.mojo</groupId>-->
            <!--                <artifactId>properties-maven-plugin</artifactId>-->
            <!--                <version>1.0.0</version>-->
            <!--                <executions>-->
            <!--                    <execution>-->
            <!--                        <phase>initialize</phase>-->
            <!--                        <goals>-->
            <!--                            <goal>read-project-properties</goal>-->
            <!--                        </goals>-->
            <!--                        <configuration>-->
            <!--                            <files>-->
            <!--                                <file>${basedir}/maven.properties</file>-->
            <!--                            </files>-->
            <!--                        </configuration>-->
            <!--                    </execution>-->
            <!--                </executions>-->
            <!--            </plugin>-->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.1.0</version>
                <executions>
                    <execution>
                        <phase>verify</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <configuration>
                            <excludes>
                                <exclude>temp.**</exclude>
                            </excludes>
                        </configuration>
                    </execution>
                </executions>
                <configuration>
                    <!-- Source JARs are used in IDEs only, we don't need resources -->
                    <excludeResources>true</excludeResources>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>3.1.0</version>
                <configuration>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>1.10</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.0</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                    <debug>true</debug>
                    <encoding>UTF-8</encoding>
                    <excludes>
                        <exclude>.gitignore</exclude>
                        <exclude>temp/**</exclude>
                    </excludes>
                </configuration>
            </plugin>
            <!--            <plugin>-->
            <!--                <groupId>org.apache.maven.plugins</groupId>-->
            <!--                <artifactId>maven-surefire-plugin</artifactId>-->
            <!--                <version>3.0.0-M5</version>-->
            <!--                <configuration>-->
            <!--                    <argLine>-Djna.library.path=${bloscJnaLibraryPath}</argLine>-->
            <!--                </configuration>-->
            <!--            </plugin>-->
        </plugins>

    </build>
    <profiles>
        <profile>
            <id>USE_BLOSC</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>properties-maven-plugin</artifactId>
                        <version>1.0.0</version>
                        <executions>
                            <execution>
                                <phase>initialize</phase>
                                <goals>
                                    <goal>read-project-properties</goal>
                                </goals>
                                <configuration>
                                    <files>
                                        <file>${basedir}/blosc.properties</file>
                                    </files>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <version>3.0.0-M5</version>
                        <configuration>
                            <argLine>-Djna.library.path=${bloscJnaLibraryPath}</argLine>
                            <systemPropertiesFile>${basedir}/blosc.properties</systemPropertiesFile>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>