<?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>de.digitalcollections</groupId>
  <artifactId>iiif-bookshelf-webapp</artifactId>
  <version>2.2.0</version>
  <packaging>war</packaging>

  <name>DigitalCollections: IIIF Bookshelf Webapp</name>
  <description>The bookshelf is a webapp for collecting IIIF representations of books. It is based on the functionality of the IIIF Presentation API for modelling books. You can add books to your bookshelf by loading the manifest.json of the book.</description>
  <url>https://github.com/dbmdz/iiif-bookshelf-webapp</url>
  <licenses>
    <license>
      <name>MIT License</name>
      <url>https://github.com/dbmdz/iiif-bookshelf-webapp/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>Johannes Baiter</name>
      <email>johannes.baiter@bsb-muenchen.de</email>
      <id>jbaiter</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-bookshelf-webapp</url>
      <system>Travis CI</system>
    </ciManagement>
    <issueManagement>
      <url>https://github.com/dbmdz/iiif-bookshelf-webapp/issues</url>
      <system>GitHub Issues</system>
    </issueManagement>
    <scm>
      <connection>https://github.com/dbmdz/iiif-bookshelf-webapp.git</connection>
      <developerConnection>git@github.com:dbmdz/iiif-bookshelf-webapp.git</developerConnection>
      <url>https://github.com/dbmdz/iiif-bookshelf-webapp</url>
    </scm>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
    <version.aspectjweaver>1.8.8</version.aspectjweaver>
    <version.iiif-mirador>2.1.1</version.iiif-mirador>
    <version.iiif-presentation-api>3.1.0</version.iiif-presentation-api>
    <version.jackson>2.5.4</version.jackson>
    <version.jacoco-maven-plugin>0.7.4.201502262128</version.jacoco-maven-plugin>
    <version.javax-servlet-api>3.1.0</version.javax-servlet-api>
    <version.json-simple>1.1.1</version.json-simple>
    <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.9.1</version.maven-javadoc-plugin>
    <version.maven-source-plugin>2.2.1</version.maven-source-plugin>
    <version.mongeez>0.9.6</version.mongeez>
    <version.mongodb-driver>3.0.4</version.mongodb-driver>
    <version.nexus-staging-maven-plugin>1.6.7</version.nexus-staging-maven-plugin>
    <version.persistence-api>1.0.2</version.persistence-api>
    <version.slf4j>1.7.21</version.slf4j>
    <version.solr>5.4.1</version.solr>
    <version.spring>4.2.5.RELEASE</version.spring>
    <version.spring-data-mongodb>1.8.4.RELEASE</version.spring-data-mongodb>
    <version.spring-security-config>4.0.1.RELEASE</version.spring-security-config>
    <version.spring-security-web>4.0.1.RELEASE</version.spring-security-web>
    <version.thymeleaf-layout-dialect>1.2.9</version.thymeleaf-layout-dialect>
    <version.thymeleaf-spring4>2.1.4.RELEASE</version.thymeleaf-spring4>
    <version.versions-maven-plugin>2.3</version.versions-maven-plugin>
  </properties>

  <build>
    <finalName>iiif-bookshelf</finalName>

    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>${version.maven-compiler-plugin}</version>
        <configuration>
          <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>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>jetty-maven-plugin</artifactId>
        <version>9.3.3.v20150827</version>
        <configuration>
          <classesDirectory>${project.build.directory}/classes</classesDirectory>
          <scanIntervalSeconds>2</scanIntervalSeconds>
          <webApp>
            <allowDuplicateFragmentNames>true</allowDuplicateFragmentNames>
            <resourceBases>
              <resourceBase>src/main/webapp</resourceBase>
              <!--<resourceBase>${project.build.directory}/${project.build.finalName}</resourceBase>-->
            </resourceBases>
            <webInfIncludeJarPattern>.*/.*(spring-security-web|spring-webmvc|spring-web).*\.jar$</webInfIncludeJarPattern>
          </webApp>
          <systemProperties>
            <systemProperty>
              <name>spring.profiles.active</name>
              <value>local</value>
            </systemProperty>
          </systemProperties>
          <httpConnector>
            <port>9898</port>
          </httpConnector>
          <!--          <stopKey>foo</stopKey>
          <stopPort>9000</stopPort>-->
        </configuration>
      </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>

  <dependencies>
    <dependency>
      <groupId>de.digitalcollections</groupId>
      <artifactId>iiif-presentation-model-api</artifactId>
      <version>${version.iiif-presentation-api}</version>
    </dependency>
    <dependency>
      <groupId>de.digitalcollections</groupId>
      <artifactId>iiif-presentation-model-impl</artifactId>
      <version>${version.iiif-presentation-api}</version>
    </dependency>
    <dependency>
      <groupId>de.digitalcollections</groupId>
      <artifactId>iiif-presentation-backend-api</artifactId>
      <version>${version.iiif-presentation-api}</version>
    </dependency>
    <dependency>
      <groupId>de.digitalcollections</groupId>
      <artifactId>iiif-presentation-backend-impl</artifactId>
      <version>${version.iiif-presentation-api}</version>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
      <version>${version.jackson}</version>
    </dependency>
    <dependency>
      <groupId>com.googlecode.json-simple</groupId>
      <artifactId>json-simple</artifactId>
      <version>${version.json-simple}</version>
    </dependency>
    <dependency>
      <groupId>javax.persistence</groupId>
      <artifactId>persistence-api</artifactId>
      <version>${version.persistence-api}</version>
    </dependency>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>javax.servlet-api</artifactId>
      <version>${version.javax-servlet-api}</version>
    </dependency>
    <dependency>
      <groupId>nz.net.ultraq.thymeleaf</groupId>
      <artifactId>thymeleaf-layout-dialect</artifactId>
      <version>${version.thymeleaf-layout-dialect}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.solr</groupId>
      <artifactId>solr-solrj</artifactId>
      <version>${version.solr}</version>
    </dependency>
    <dependency>
      <groupId>org.aspectj</groupId>
      <artifactId>aspectjweaver</artifactId>
      <version>${version.aspectjweaver}</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.mongodb</groupId>
      <artifactId>mongodb-driver</artifactId>
      <version>${version.mongodb-driver}</version>
    </dependency>
    <dependency>
      <groupId>org.mongeez</groupId>
      <artifactId>mongeez</artifactId>
      <version>${version.mongeez}</version>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>${version.slf4j}</version>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-log4j12</artifactId>
      <version>${version.slf4j}</version>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-beans</artifactId>
      <version>${version.spring}</version>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-webmvc</artifactId>
      <version>${version.spring}</version>
    </dependency>
    <dependency>
      <groupId>org.springframework.data</groupId>
      <artifactId>spring-data-mongodb</artifactId>
      <version>${version.spring-data-mongodb}</version>
      <exclusions>
        <exclusion>
          <groupId>org.mongodb</groupId>
          <artifactId>mongo-java-driver</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.springframework.security</groupId>
      <artifactId>spring-security-config</artifactId>
      <version>${version.spring-security-config}</version>
    </dependency>
    <dependency>
      <groupId>org.springframework.security</groupId>
      <artifactId>spring-security-web</artifactId>
      <version>${version.spring-security-web}</version>
    </dependency>
    <dependency>
      <groupId>org.thymeleaf</groupId>
      <artifactId>thymeleaf-spring4</artifactId>
      <version>${version.thymeleaf-spring4}</version>
    </dependency>
    <dependency>
      <groupId>org.webjars</groupId>
      <artifactId>mirador</artifactId>
      <version>${version.iiif-mirador}</version>
    </dependency>
  </dependencies>

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