<?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.5.0</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>SabineEmbacher</id>
            <name>Sabine Embacher</name>
            <roles>
                <role>maintainer</role>
            </roles>
        </developer>
        <developer>
            <id>TonioF</id>
            <name>Tonio Fincke</name>
            <roles>
                <role>maintainer</role>
            </roles>
        </developer>
        <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.27.7</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

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

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.3.1</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.codehaus.mojo</groupId>
              <artifactId>buildnumber-maven-plugin</artifactId>
              <version>3.2.0</version>
              <!-- Record SCM revision in manifest. -->
              <executions>
                <execution>
                  <phase>validate</phase>
                  <goals>
                    <goal>create</goal>
                  </goals>
                </execution>
              </executions>
              <configuration>
                <getRevisionOnlyOnce>true</getRevisionOnlyOnce>
                <revisionOnScmFailure>UNKNOWN</revisionOnScmFailure>
              </configuration>
            </plugin>
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-jar-plugin</artifactId>
              <version>3.3.0</version>
              <configuration>
                <archive>
                  <manifest>
                    <addBuildEnvironmentEntries>true</addBuildEnvironmentEntries>
                    <addClasspath>true</addClasspath>
                    <addDefaultEntries>true</addDefaultEntries>
                    <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                    <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                  </manifest>
                  <manifestEntries>
                    <!-- Add SCM revision from buildnumber plugin, if available. -->
                    <Implementation-Build>${buildNumber}</Implementation-Build>
                  </manifestEntries>
                </archive>
              </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.7.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-gpg-plugin</artifactId>
                <version>3.2.7</version>
                <executions>
                    <execution>
                    <id>sign-artifacts</id>
                    <phase>verify</phase>
                    <goals>
                        <goal>sign</goal>
                    </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.sonatype.central</groupId>
                <artifactId>central-publishing-maven-plugin</artifactId>
                <version>0.7.0</version>
                <extensions>true</extensions>

                <configuration>
                    <publishingServerId>central</publishingServerId>
                    <autoPublish>false</autoPublish>
                </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>
                            <includes>**/*.java</includes>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>