<?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>streaming-server-euphoria</artifactId>
  <version>1.1.1</version>
  <packaging>war</packaging>

  <name>DigitalCollections: Euphoria Streaming Server</name>
  <description> Euphoria is a streaming server for video, audio and other files.</description>
  <url>https://github.com/dbmdz/streaming-server-euphoria</url>
  <licenses>
    <license>
      <name>MIT License</name>
      <url>https://github.com/dbmdz/streaming-server-euphoria/blob/master/LICENSE</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <developers>
    <developer>
      <name>Ralf Eichinger</name>
      <email>ralf.eichinger@bsb-muenchen.de</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/streaming-server-euphoria</url>
    <system>Travis CI</system>
  </ciManagement>
  <issueManagement>
    <url>https://github.com/dbmdz/streaming-server-euphoria/issues</url>
    <system>GitHub Issues</system>
  </issueManagement>
  <scm>
    <connection>https://github.com/dbmdz/streaming-server-euphoria.git</connection>
    <developerConnection>git@github.com:dbmdz/streaming-server-euphoria.git</developerConnection>
    <url>https://github.com/dbmdz/streaming-server-euphoria</url>
  </scm>

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

    <version.aspectjweaver>1.8.9</version.aspectjweaver>
    <version.commons-io>2.5</version.commons-io>
    <version.digitalcollections-core>1.2.4</version.digitalcollections-core>
    <version.jacoco-maven-plugin>0.7.7.201606060606</version.jacoco-maven-plugin>
    <version.javax.servlet-api>3.1.0</version.javax.servlet-api>
    <version.jetty-maven-plugin>9.3.3.v20150827</version.jetty-maven-plugin>
    <version.joda-time>2.5</version.joda-time>
    <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.maven-war-plugin>2.6</version.maven-war-plugin>
    <version.nexus-staging-maven-plugin>1.6.7</version.nexus-staging-maven-plugin>
    <version.slf4j>1.7.21</version.slf4j>
    <version.springframework>4.3.6.RELEASE</version.springframework>
    <version.thymeleaf>2.1.4.RELEASE</version.thymeleaf>
    <version.thymeleaf-extras-conditionalcomments>2.1.2.RELEASE</version.thymeleaf-extras-conditionalcomments>
    <version.thymeleaf-extras-data-attribute>1.3</version.thymeleaf-extras-data-attribute>
    <version.thymeleaf-layout-dialect>1.2.7</version.thymeleaf-layout-dialect>
    <version.versions-maven-plugin>2.3</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-respond>1.4.2</version.webjar-respond>
  </properties>

  <dependencies>
    <dependency>
      <groupId>com.github.mxab.thymeleaf.extras</groupId>
      <artifactId>thymeleaf-extras-data-attribute</artifactId>
      <version>${version.thymeleaf-extras-data-attribute}</version>
    </dependency>
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <version>${version.commons-io}</version>
    </dependency>
    <dependency>
      <groupId>de.digitalcollections</groupId>
      <artifactId>digitalcollections-core-backend-impl-file</artifactId>
      <version>${version.digitalcollections-core}</version>
    </dependency>
    <dependency>
      <groupId>de.digitalcollections</groupId>
      <artifactId>digitalcollections-core-business-api</artifactId>
      <version>${version.digitalcollections-core}</version>
    </dependency>
    <dependency>
      <groupId>de.digitalcollections</groupId>
      <artifactId>digitalcollections-core-business-impl</artifactId>
      <version>${version.digitalcollections-core}</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>javax.servlet-api</artifactId>
      <version>${version.javax.servlet-api}</version>
    </dependency>
    <dependency>
      <groupId>joda-time</groupId>
      <artifactId>joda-time</artifactId>
      <version>${version.joda-time}</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>nz.net.ultraq.thymeleaf</groupId>
      <artifactId>thymeleaf-layout-dialect</artifactId>
      <version>${version.thymeleaf-layout-dialect}</version>
    </dependency>
    <dependency>
      <groupId>org.aspectj</groupId>
      <artifactId>aspectjweaver</artifactId>
      <version>${version.aspectjweaver}</version>
      <scope>runtime</scope>
    </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-context</artifactId>
      <version>${version.springframework}</version>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-webmvc</artifactId>
      <version>${version.springframework}</version>
    </dependency>
    <dependency>
      <groupId>org.thymeleaf</groupId>
      <artifactId>thymeleaf</artifactId>
      <version>${version.thymeleaf}</version>
    </dependency>
    <dependency>
      <groupId>org.thymeleaf</groupId>
      <artifactId>thymeleaf-spring4</artifactId>
      <version>${version.thymeleaf}</version>
    </dependency>
    <dependency>
      <groupId>org.thymeleaf.extras</groupId>
      <artifactId>thymeleaf-extras-conditionalcomments</artifactId>
      <version>${version.thymeleaf-extras-conditionalcomments}</version>
    </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>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>
  </dependencies>

  <build>
    <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.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
        <version>${version.maven-war-plugin}</version>
        <configuration>
          <failOnMissingWebXml>false</failOnMissingWebXml>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>versions-maven-plugin</artifactId>
        <version>${version.versions-maven-plugin}</version>
      </plugin>
      <plugin>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>jetty-maven-plugin</artifactId>
        <version>${version.jetty-maven-plugin}</version>
        <configuration>
          <classesDirectory>${project.build.directory}/classes</classesDirectory>
          <scanIntervalSeconds>2</scanIntervalSeconds>
          <webApp>
            <contextPath>/media</contextPath>
            <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>
        </configuration>
      </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>

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

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

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