<?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.6.RELEASE</version>
  </parent>
  
  <groupId>de.digitalcollections</groupId>
  <artifactId>iiif-server-demo</artifactId>
  <version>2.0.1</version>
  <packaging>jar</packaging>
  
  <name>IIIF: 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>
  </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.0.1</version.iiif-image>
    <version.iiif-presentation>2.0.0</version.iiif-presentation>
    <version.jacoco-maven-plugin>0.7.4.201502262128</version.jacoco-maven-plugin>
    <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.versions-maven-plugin>2.2</version.versions-maven-plugin>
  </properties>
  
  <dependencies>
    <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>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>de.digitalcollections</groupId>
      <artifactId>iiif-presentation-business-impl</artifactId>
      <version>${version.iiif-presentation}</version>
      <scope>runtime</scope>
    </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.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-log4j12</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>
  </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>**/SpringConfig*</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>
  
  <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>
