<?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-Root</artifactId>
    <packaging>pom</packaging>
    <version>1.9.0</version>
    <name>ShopChest</name>
    <url>https://www.spigotmc.org/resources/shopchest.11431/</url>

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

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

    <modules>
        <module>ShopChest</module>
        <module>ShopChest NMS-Abstract</module>
        <module>ShopChest NMS-v1_8_R1</module>
        <module>ShopChest NMS-v1_8_R2</module>
        <module>ShopChest NMS-v1_8_R3</module>
        <module>ShopChest NMS-v1_9_R1</module>
        <module>ShopChest NMS-v1_9_R2</module>
        <module>ShopChest NMS-v1_10_R1</module>
    </modules>

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

    <dependencies>
        <dependency>
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot-api</artifactId>
            <version>1.10.2-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.bukkit</groupId>
            <artifactId>bukkit</artifactId>
            <version>1.10.2-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>org.yi.acru.bukkit</groupId>
            <artifactId>lockette</artifactId>
            <version>1.8.36</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>me.minebuilders</groupId>
            <artifactId>clearlag</artifactId>
            <version>2.9.1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.griefcraft.lwc</groupId>
            <artifactId>lwc-entity-locking</artifactId>
            <version>1.7.3</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-shade-plugin</artifactId>
                <version>2.4.3</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.10.4</version>
                <executions>
                    <execution>
                        <id>aggregate</id>
                        <goals>
                            <goal>aggregate</goal>
                        </goals>
                        <phase>site</phase>
                        <configuration>
                            <doctitle>ShopChest ${project.version} API</doctitle>
                            <windowtitle>ShopChest ${project.version} API</windowtitle>
                        </configuration>
                    </execution>
                    <execution>
                        <id>jar</id>
                        <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>