<?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>

    <repositories>
        <repository>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            <id>bintray-vatbub-fokprojectsReleases</id>
            <name>bintray</name>
            <url>http://dl.bintray.com/vatbub/fokprojectsReleases</url>
        </repository>
        <repository>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            <id>bintray-vatbub-fokprojectsSnapshots</id>
            <name>bintray</name>
            <url>http://dl.bintray.com/vatbub/fokprojectsSnapshots</url>
        </repository>
        <repository>
            <snapshots />
            <id>snapshots</id>
            <name>libs-snapshot</name>
            <url>https://oss.jfrog.org/artifactory/libs-snapshot</url>
        </repository>
    </repositories>

    <parent>
        <artifactId>tictactoe.parent</artifactId>
        <groupId>com.github.vatbub</groupId>
        <version>0.0.2</version>
    </parent>

    <scm>
        <connection>scm:git:git@github.com:vatbub/${gitRepoName}.git</connection>
        <url>https://github.com/vatbub/${gitRepoName}</url>
        <developerConnection>scm:git:git@github.com:vatbub/${gitRepoName}.git</developerConnection>
        <tag>tictactoe.parent-0.0.2</tag>
    </scm>

    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/vatbub/${gitRepoName}/issues</url>
    </issueManagement>

    <ciManagement>
        <system>Travis CI</system>
        <url>https://travis-ci.org/vatbub/${gitRepoName}</url>
    </ciManagement>

    <artifactId>tictactoe.server</artifactId>
    <packaging>jar</packaging>
    <name>tictactoe.server</name>
    <description>The server component required for online multiplayer gaming</description>

    <properties>
        <maven.build.timestamp.format>yyyyMMddHHmmss</maven.build.timestamp.format>
        <gitRepoName>tictactoe</gitRepoName>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <mainClass>com.github.vatbub.tictactoe.server.ServerMain</mainClass>
    </properties>

    <dependencies>
        <dependency>
            <groupId>com.github.vatbub</groupId>
            <artifactId>tictactoe.common</artifactId>
            <version>0.0.2</version>
        </dependency>
        <dependency>
            <groupId>de.taimos</groupId>
            <artifactId>totp</artifactId>
            <version>1.0</version>
        </dependency>
    </dependencies>

    <build>
        <finalName>${project.name}</finalName>
        <plugins>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <executions>
                    <execution>
                        <!-- Create the jar-with-dependencies -->
                        <id>buildMainExecutableJar</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.heroku.sdk</groupId>
                <artifactId>heroku-maven-plugin</artifactId>
                <version>1.1.3</version>
                <configuration>
                    <appName>vatbubtictactoeserver</appName>
                    <includeTarget>false</includeTarget>
                    <includes>
                        <include>target/${build.finalName}-jar-with-dependencies.jar</include>
                    </includes>
                    <processTypes>
                        <web>java -jar target/${build.finalName}-jar-with-dependencies.jar</web>
                    </processTypes>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
