<?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.epiceric</groupId>
    <artifactId>ShopChest</artifactId>
    <packaging>jar</packaging>
    <version>1.11.1</version>
    <name>ShopChest</name>
    <url>https://www.spigotmc.org/resources/shopchest.11431/</url>
    <description>Let your players create their own nice-looking shops to sell their stuff to other players!</description>

    <properties>
        <maven.compiler.source>1.7</maven.compiler.source>
        <maven.compiler.target>1.7</maven.compiler.target>

        <github.global.server>github</github.global.server>

        <javadoc.opts><!-- Only jdk 1.8 and later --></javadoc.opts>
    </properties>

    <profiles>
        <profile>
            <id>doclint-java8</id>
            <activation>
                <jdk>[1.8,)</jdk>
            </activation>
            <properties>
                <javadoc.opts>-Xdoclint:none</javadoc.opts>
            </properties>
        </profile>
    </profiles>

    <repositories>
        <repository>
            <id>spigot-repo</id>
            <url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
        </repository>
        <repository>
            <id>vault-repo</id>
            <url>http://nexus.hc.to/content/repositories/pub_releases/</url>
        </repository>
        <repository>
            <id>epiceric-repo</id>
            <url>http://epicericee.github.io/ShopChest/maven/</url>
        </repository>
    </repositories>

    <dependencies>
        <dependency>
            <groupId>org.bukkit</groupId>
            <artifactId>bukkit</artifactId>
            <version>1.11-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>net.milkbowl.vault</groupId>
            <artifactId>VaultAPI</artifactId>
            <version>1.6</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.sk89q</groupId>
            <artifactId>worldguard</artifactId>
            <version>6.1.3-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.palmergames</groupId>
            <artifactId>Towny</artifactId>
            <version>0.91.1.0</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <distributionManagement>
        <repository>
            <id>internal-maven-repo</id>
            <url>file://${project.build.directory}/gh-pages/maven</url>
        </repository>
    </distributionManagement>

    <build>
        <finalName>${project.artifactId}</finalName>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <targetPath>.</targetPath>
                <filtering>true</filtering>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.10.4</version>
                <configuration>
                    <additionalparam>${javadoc.opts}</additionalparam>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <phase>package</phase>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>2.7</version>
                <configuration>
                    <altDeploymentRepository>internal-maven-repo::default::file://${project.build.directory}/gh-pages/maven</altDeploymentRepository>
                    <javadoc>${project.build.directory}/${project.build.finalName}-javadoc.jar</javadoc>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.github.github</groupId>
                <artifactId>site-maven-plugin</artifactId>
                <version>0.12</version>
                <configuration>
                    <message>
Updated Maven Artifact

Artifact: ${project.artifactId}
Version: ${project.version}
Timestamp: ${maven.build.timestamp}
                    </message>
                    <outputDirectory>${project.build.directory}/gh-pages</outputDirectory>
                    <branch>refs/heads/gh-pages</branch>
                    <merge>true</merge>
                    <repositoryName>ShopChest</repositoryName>
                    <repositoryOwner>EpicEricEE</repositoryOwner>
                </configuration>
                <executions>
                    <execution>
                        <phase>deploy</phase>
                        <goals>
                            <goal>site</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>