<?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>dev.zarr</groupId>
    <artifactId>jzarr</artifactId>
    <version>0.4.2</version>

    <name>JZarr</name>

    <description>
        JZarr is a Java library providing an implementation of chunked,
        compressed, N-dimensional arrays close to the zarr-python package.
    </description>

    <url>https://github.com/zarr-developers/jzarr</url>

    <licenses>
        <license>
            <name>MIT License</name>
            <url>https://opensource.org/license/mit/</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <scm>
        <url>https://github.com/zarr-developers/jzarr</url>
        <connection>scm:git:git://github.com/zarr-developers/jzarr.git</connection>
        <developerConnection>scm:git:git@github.com:zarr-developers/jzarr.git</developerConnection>
    </scm>

    <developers>
        <developer>
            <id>joshmoore</id>
            <name>Josh Moore</name>
            <roles>
                <role>maintainer</role>
            </roles>
        </developer>
    </developers>

    <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.12.7.1</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.9</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>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <repositories>
        <repository>
            <id>unidata.releases</id>
            <url>https://artifacts.unidata.ucar.edu/content/repositories/unidata-releases</url>
            <snapshots><enabled>false</enabled></snapshots>
        </repository>
    </repositories>

    <build>
        <plugins>
            <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-javadoc-plugin</artifactId>
                <version>3.5.0</version>
                <executions>
                    <execution>
                    <id>attach-javadoc</id>
                    <goals>
                        <goal>jar</goal>
                    </goals>
                    </execution>
                </executions>
                <configuration>
                    <source>8</source>
                </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>
                        <includes>**/*.java</includes>
                    </configuration>
             </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>1.6</version>
                <executions>
                    <execution>
                    <id>sign-artifacts</id>
                    <phase>verify</phase>
                    <goals>
                        <goal>sign</goal>
                    </goals>
                    <configuration>
                        <keyname>9F88D86AD9A0D91E</keyname>
                    </configuration>
                    </execution>
                </executions>
            </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>
                            <includes>**/*.java</includes>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
