<?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>

  <parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.0.2.RELEASE</version>
  </parent>

  <groupId>de.digitalcollections</groupId>
  <artifactId>iiif-server-demo</artifactId>
  <version>3.3.3</version>
  <packaging>jar</packaging>

  <name>DigitalCollections: IIIF Server Demo</name>
  <description>A standalone IIIF server demonstrating the features of the IIIF APIs (see http://iiif.io/technical-details/) and and showcasing different IIIF viewers.</description>
  <url>https://github.com/dbmdz/iiif-server-demo</url>
  <licenses>
    <license>
      <name>MIT License</name>
      <url>https://github.com/dbmdz/iiif-server-demo/blob/master/LICENSE</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <developers>
    <developer>
      <name>Ralf Eichinger</name>
      <email>ralf.eichinger@bsb-muenchen</email>
      <id>datazuul</id>
    </developer>
    <developer>
      <name>Matthias Lindinger</name>
      <email>matthias.lindinger@bsb-muenchen.de</email>
      <id>morpheus-87</id>
    </developer>
  </developers>
  <ciManagement>
    <url>https://travis-ci.org/dbmdz/iiif-server-demo</url>
    <system>Travis CI</system>
  </ciManagement>
  <issueManagement>
    <url>https://github.com/dbmdz/iiif-server-demo/issues</url>
    <system>GitHub Issues</system>
  </issueManagement>
  <scm>
    <connection>https://github.com/dbmdz/iiif-server-demo.git</connection>
    <developerConnection>git@github.com:dbmdz/iiif-server-demo.git</developerConnection>
    <url>https://github.com/dbmdz/iiif-server-demo</url>
  </scm>

  <properties>
    <java.version>1.8</java.version>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

    <!-- dependencies -->
    <version.iiif-server-hymir>3.6.0</version.iiif-server-hymir>
    <version.webjar-diva>5.1.3</version.webjar-diva>
    <version.webjar-fontawesome>4.7.0</version.webjar-fontawesome>
    <version.webjar-highlightjs>9.12.0</version.webjar-highlightjs>
    <version.webjar-leaflet>1.3.1</version.webjar-leaflet>
    <version.webjar-leaflet-iiif>2.0.1</version.webjar-leaflet-iiif>
    <version.webjar-mirador-multipagenavigation>1.1.1</version.webjar-mirador-multipagenavigation>
    <version.webjar-mirador-downloadmenu>1.0.0</version.webjar-mirador-downloadmenu>
    <version.webjar-tify>0.19.3</version.webjar-tify>
    <version.webjar-universalviewer>2.0.2</version.webjar-universalviewer>

    <!-- plugins -->
    <version.jacoco-maven-plugin>0.7.8</version.jacoco-maven-plugin>
    <version.junit-platform-surefire-provider>1.2.0</version.junit-platform-surefire-provider>
    <version.maven-compiler-plugin>3.7.0</version.maven-compiler-plugin>
    <version.maven-gpg-plugin>1.6</version.maven-gpg-plugin>
    <version.maven-javadoc-plugin>2.10.4</version.maven-javadoc-plugin>
    <version.maven-source-plugin>3.0.1</version.maven-source-plugin>
    <version.maven-surefire-plugin>2.21.0</version.maven-surefire-plugin>
    <version.nexus-staging-maven-plugin>1.6.7</version.nexus-staging-maven-plugin>
    <version.versions-maven-plugin>2.5</version.versions-maven-plugin>
  </properties>

  <dependencies>
    <dependency>
      <groupId>de.digitalcollections</groupId>
      <artifactId>iiif-server-hymir</artifactId>
      <version>${version.iiif-server-hymir}</version>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-api</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-engine</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-test</artifactId>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <groupId>junit</groupId>
          <artifactId>junit</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.webjars</groupId>
      <artifactId>tify</artifactId>
      <version>${version.webjar-tify}</version>
    </dependency>
    <dependency>
      <groupId>org.webjars.bower</groupId>
      <artifactId>highlightjs</artifactId>
      <version>${version.webjar-highlightjs}</version>
    </dependency>
    <dependency>
      <groupId>org.webjars.npm</groupId>
      <artifactId>dbmdz__mirador-downloadmenu</artifactId>
      <version>${version.webjar-mirador-downloadmenu}</version>
    </dependency>
    <dependency>
      <groupId>org.webjars.npm</groupId>
      <artifactId>dbmdz__mirador-multipagenavigation</artifactId>
      <version>${version.webjar-mirador-multipagenavigation}</version>
    </dependency>
    <dependency>
      <groupId>org.webjars.npm</groupId>
      <artifactId>diva.js</artifactId>
      <version>${version.webjar-diva}</version>
      <exclusions>
        <exclusion>
          <groupId>org.webjars.npm</groupId>
          <artifactId>jquery</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.webjars.npm</groupId>
      <artifactId>font-awesome</artifactId>
      <version>${version.webjar-fontawesome}</version>
    </dependency>
    <dependency>
      <groupId>org.webjars.npm</groupId>
      <artifactId>leaflet</artifactId>
      <version>${version.webjar-leaflet}</version>
    </dependency>
    <dependency>
      <groupId>org.webjars.npm</groupId>
      <artifactId>leaflet-iiif</artifactId>
      <version>${version.webjar-leaflet-iiif}</version>
    </dependency>
    <dependency>
      <groupId>org.webjars.npm</groupId>
      <artifactId>universalviewer</artifactId>
      <version>${version.webjar-universalviewer}</version>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>${version.maven-compiler-plugin}</version>
        <configuration>
          <showDeprecation>true</showDeprecation>
          <encoding>${project.build.sourceEncoding}</encoding>
          <source>${maven.compiler.source}</source>
          <target>${maven.compiler.target}</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>${version.maven-javadoc-plugin}</version>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>${version.maven-source-plugin}</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>${version.maven-surefire-plugin}</version>
        <dependencies>
          <dependency>
            <groupId>org.junit.platform</groupId>
            <artifactId>junit-platform-surefire-provider</artifactId>
            <version>${version.junit-platform-surefire-provider}</version>
          </dependency>
        </dependencies>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>versions-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>${version.jacoco-maven-plugin}</version>
        <executions>
          <execution>
            <id>pre-unit-test</id>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
          <execution>
            <phase>test</phase>
            <goals>
              <goal>report</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <excludes>
            <exclude>**/SpringConfig*</exclude>
            <exclude>**/Application*</exclude>
          </excludes>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>nexus-staging-maven-plugin</artifactId>
        <version>${version.nexus-staging-maven-plugin}</version>
        <extensions>true</extensions>
        <configuration>
          <serverId>ossrh</serverId>
          <nexusUrl>https://oss.sonatype.org/</nexusUrl>
          <autoReleaseAfterClose>true</autoReleaseAfterClose>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-maven-plugin</artifactId>
        <configuration>
          <mainClass>de.digitalcollections.iiif.demo.Application</mainClass>
          <classifier>exec</classifier>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>repackage</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <filtering>false</filtering>
      </resource>
      <resource>
        <directory>src/main/resources</directory>
        <filtering>true</filtering>
        <includes>
          <include>application.yml</include>
          <include>iiif-versions-custom.yml</include>
        </includes>
      </resource>
    </resources>
  </build>

  <distributionManagement>
    <snapshotRepository>
      <id>ossrh-snapshots</id>
      <name>Sonatype Nexus Snapshots</name>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
  </distributionManagement>

  <repositories>
    <repository>
      <id>ossrh-snapshots</id>
      <name>Sonatype Nexus Snapshots</name>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
      <releases>
        <enabled>false</enabled>
      </releases>
    </repository>
  </repositories>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>${version.jacoco-maven-plugin}</version>
      </plugin>
    </plugins>
  </reporting>

  <profiles>
    <profile>
      <id>deploy</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>${version.maven-gpg-plugin}</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
