<?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>1.2.8.RELEASE</version>
  </parent>

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

  <name>DigitalCollections: IIIF Server Demo</name>
  <description>A standalone IIIF server demonstrating the use of IIIF Image API Java Libraries (https://github.com/dbmdz/iiif-image-api) and IIIF Presentation API Java Libraries (https://github.com/dbmdz/iiif-presentation-api) (Java implementations of the IIIF specifications: http://iiif.io/technical-details/).</description>
  <url>https://github.com/dbmdz/iiif-server-demo</url>
  <licenses>
    <license>
      <name>MIT License</name>
      <url>https://github.com/dbmdz/iiif-image-api/blob/master/LICENSE</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <developers>
    <developer>
      <name>Ralf Eichinger</name>
      <email>ralf.eichinger@gmail.com</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>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

    <version.iiif-image>2.2.5</version.iiif-image>
    <version.iiif-mirador>2.2.0</version.iiif-mirador>
    <version.iiif-presentation>3.2.4</version.iiif-presentation>
    <version.jackson>2.8.6</version.jackson>
    <version.jacoco-maven-plugin>0.7.4.201502262128</version.jacoco-maven-plugin>
    <version.logback-classic>1.1.9</version.logback-classic>
    <version.logback-ext-spring>0.1.4</version.logback-ext-spring>
    <version.maven-compiler-plugin>3.3</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.19.1</version.maven-surefire-plugin>
    <version.nexus-staging-maven-plugin>1.6.7</version.nexus-staging-maven-plugin>
    <version.slf4j>1.7.13</version.slf4j>
    <version.thymeleaf-extras-conditionalcomments>2.1.2.RELEASE</version.thymeleaf-extras-conditionalcomments>
    <version.versions-maven-plugin>2.2</version.versions-maven-plugin>
    <version.webjar-bootstrap>3.3.7</version.webjar-bootstrap>
    <version.webjar-html5shiv>3.7.3</version.webjar-html5shiv>
    <version.webjar-ie10-viewport-bug-workaround>1.0.3</version.webjar-ie10-viewport-bug-workaround>
    <version.webjar-jquery>1.11.3</version.webjar-jquery>
    <version.webjar-leaflet>1.0.3</version.webjar-leaflet>
    <version.webjar-leaflet-iiif>1.1.1</version.webjar-leaflet-iiif>
    <version.webjar-openseadragon>2.2.1</version.webjar-openseadragon>
    <version.webjar-respond>1.4.2</version.webjar-respond>
    <version.webjar-universalviewer>1.6.14</version.webjar-universalviewer>
  </properties>

  <dependencies>
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <version>${version.logback-classic}</version>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-annotations</artifactId>
      <version>${version.jackson}</version>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-core</artifactId>
      <version>${version.jackson}</version>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
      <version>${version.jackson}</version>
    </dependency>
    <dependency>
      <groupId>de.digitalcollections</groupId>
      <artifactId>iiif-image-backend-impl</artifactId>
      <version>${version.iiif-image}</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>de.digitalcollections</groupId>
      <artifactId>iiif-image-business-impl</artifactId>
      <version>${version.iiif-image}</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>de.digitalcollections</groupId>
      <artifactId>iiif-image-frontend-impl-springmvc</artifactId>
      <version>${version.iiif-image}</version>
      <scope>compile</scope> <!-- not runtime, because of twelvemonkeys IIOProviderContextListener in WebappInitializer... -->
    </dependency>
    <dependency>
      <groupId>de.digitalcollections</groupId>
      <artifactId>iiif-presentation-backend-impl</artifactId>
      <version>${version.iiif-presentation}</version>
    </dependency>
    <dependency>
      <groupId>de.digitalcollections</groupId>
      <artifactId>iiif-presentation-business-impl</artifactId>
      <version>${version.iiif-presentation}</version>
    </dependency>
    <dependency>
      <groupId>de.digitalcollections</groupId>
      <artifactId>iiif-presentation-frontend-impl-springmvc</artifactId>
      <version>${version.iiif-presentation}</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.logback-extensions</groupId>
      <artifactId>logback-ext-spring</artifactId>
      <version>${version.logback-ext-spring}</version>
      <exclusions>
        <exclusion>
          <groupId>ch.qos.logback</groupId>
          <artifactId>logback-classic</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-test</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-thymeleaf</artifactId>
      <exclusions>
        <exclusion>
          <groupId>ch.qos.logback</groupId>
          <artifactId>logback-classic</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-aop</artifactId>
    </dependency>
    <dependency>
      <groupId>org.thymeleaf.extras</groupId>
      <artifactId>thymeleaf-extras-conditionalcomments</artifactId>
    </dependency>
    <dependency>
      <groupId>org.webjars</groupId>
      <artifactId>bootstrap</artifactId>
      <version>${version.webjar-bootstrap}</version>
      <exclusions>
        <exclusion>
          <groupId>org.webjars</groupId>
          <artifactId>jquery</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.webjars</groupId>
      <artifactId>html5shiv</artifactId>
      <version>${version.webjar-html5shiv}</version>
    </dependency>
    <dependency>
      <groupId>org.webjars</groupId>
      <artifactId>jquery</artifactId>
      <version>${version.webjar-jquery}</version>
    </dependency>
    <dependency>
      <groupId>org.webjars</groupId>
      <artifactId>mirador</artifactId>
      <version>${version.iiif-mirador}</version>
    </dependency>
    <dependency>
      <groupId>org.webjars</groupId>
      <artifactId>openseadragon</artifactId>
      <version>${version.webjar-openseadragon}</version>
    </dependency>
    <dependency>
      <groupId>org.webjars</groupId>
      <artifactId>respond</artifactId>
      <version>${version.webjar-respond}</version>
    </dependency>
    <dependency>
      <groupId>org.webjars.bower</groupId>
      <artifactId>ie10-viewport-bug-workaround</artifactId>
      <version>${version.webjar-ie10-viewport-bug-workaround}</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>
    <finalName>iiif-server-demo</finalName>

    <plugins>
      <plugin>
        <!--
The Spring Boot Maven plugin provides many convenient features:
- It collects all the jars on the classpath and builds a single, runnable "über-jar", which makes it more convenient to execute and transport your service.
- It searches for the public static void main() method to flag as a runnable class.
- It provides a built-in dependency resolver that sets the version number to match Spring Boot dependencies. You can override any version you wish, but it will default to Boot’s chosen set of versions.
        -->
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-maven-plugin</artifactId>
      </plugin>
      <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>
        </configuration>
      </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>
        <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-surefire-plugin</artifactId>
        <version>${version.maven-surefire-plugin}</version>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>versions-maven-plugin</artifactId>
        <version>${version.versions-maven-plugin}</version>
      </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>**/Application*</exclude>
            <exclude>**/SpringConfig*</exclude>
            <exclude>**/WebappInitializer*</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>
    </plugins>
  </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>
