<?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>com.acrobot.chestshop</groupId>
    <artifactId>chestshop</artifactId>
    <version>3.9.3-SNAPSHOT</version>
    <description>Chest-and-sign shop plugin for Bukkit</description>
    <name>ChestShop</name>

    <scm>
        <connection>scm:git:git://github.com/ChestShop-authors/ChestShop-3</connection>
        <developerConnection>scm:git:ssh://git@github.com/ChestShop-authors/ChestShop-3.git</developerConnection>
        <url>https://github.com/ChestShop-authors/ChestShop-3</url>
    </scm>

    <repositories>
        <repository>
            <id>spigotmc-repo</id>
            <url>https://hub.spigotmc.org/nexus/content/groups/public</url>
        </repository>
        <repository>
            <id>sk89q-repo</id>
            <url>http://maven.sk89q.com/artifactory/repo/</url>
        </repository>
        <repository>
            <id>bstats-repo</id>
            <url>http://repo.bstats.org/content/repositories/releases/</url>
        </repository>
        <repository>
            <id>vault-repo</id>
            <url>http://nexus.hc.to/content/repositories/pub_releases/</url>
        </repository>
        <repository>
            <id>authme-repo</id>
            <url>http://ci.xephi.fr/plugin/repository/everything/</url>
        </repository>
        <repository>
            <id>minebench-repo</id>
            <url>https://repo.minebench.de/</url>
        </repository>
        <repository>
            <id>local_repo</id>
            <url>file://${project.basedir}/repo/</url>
        </repository>
        <repository>
            <id>reserve-repo</id>
            <url>https://dl.bintray.com/theneweconomy/java/</url>
        </repository>
    </repositories>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.j256.ormlite</groupId>
            <artifactId>ormlite-jdbc</artifactId>
            <version>5.1</version>
            <scope>compile</scope>
        </dependency>

        <!-- Should be kept in sync with Mojang -->
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-core</artifactId>
            <version>2.1</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot-api</artifactId>
            <version>1.13-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.mcstats.bukkit</groupId>
            <artifactId>metrics</artifactId>
            <version>R8-SNAPSHOT</version>
            <scope>compile</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.bukkit</groupId>
                    <artifactId>bukkit</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.bukkit</groupId>
                    <artifactId>craftbukkit</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.bstats</groupId>
            <artifactId>bstats-bukkit-lite</artifactId>
            <version>1.2</version>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>net.milkbowl.vault</groupId>
            <artifactId>Vault</artifactId>
            <version>1.6.6</version>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.bukkit</groupId>
                    <artifactId>bukkit</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.bukkit</groupId>
                    <artifactId>craftbukkit</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>info.somethingodd</groupId>
            <artifactId>odditem</artifactId>
            <version>0.9.5</version>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.bukkit</groupId>
                    <artifactId>bukkit</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.bukkit</groupId>
                    <artifactId>craftbukkit</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        
        <dependency>
            <groupId>com.herocraftonline.heroes</groupId>
            <artifactId>Heroes</artifactId>
            <version>1.5.5</version>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>*</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>fr.xephi</groupId>
            <artifactId>authme</artifactId>
            <version>5.2-SNAPSHOT</version>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.bukkit</groupId>
                    <artifactId>bukkit</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>com.griefcraft.lwc</groupId>
            <artifactId>lwc</artifactId>
            <version>4.3.1</version>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.bukkit</groupId>
                    <artifactId>bukkit</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.bukkit</groupId>
                    <artifactId>craftbukkit</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>com.daemitus.deadbolt</groupId>
            <artifactId>deadbolt</artifactId>
            <version>2.2</version>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.bukkit</groupId>
                    <artifactId>bukkit</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.bukkit</groupId>
                    <artifactId>craftbukkit</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>javax.persistence</groupId>
            <artifactId>persistence-api</artifactId>
            <version>1.0</version>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>jsr305</artifactId>
            <version>3.0.2</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.sk89q.worldedit</groupId>
            <artifactId>worldedit</artifactId>
            <version>7.0-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.sk89q.worldguard</groupId>
            <artifactId>worldguard-legacy</artifactId>
            <version>7.0-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.webkonsept.bukkit.simplechestlock</groupId>
            <artifactId>simplechestlock</artifactId>
            <version>1.2.1</version>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.bukkit</groupId>
                    <artifactId>bukkit</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.bukkit</groupId>
                    <artifactId>craftbukkit</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.yi.acru.bukkit.lockette</groupId>
            <artifactId>lockette</artifactId>
            <version>1.8.14</version>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.bukkit</groupId>
                    <artifactId>bukkit</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.bukkit</groupId>
                    <artifactId>craftbukkit</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>com.bekvon.bukkit</groupId>
            <artifactId>residence</artifactId>
            <version>4.6.1.4</version>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.bukkit</groupId>
                    <artifactId>bukkit</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.bukkit</groupId>
                    <artifactId>craftbukkit</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>de.themoep.showitem</groupId>
            <artifactId>api</artifactId>
            <version>1.2.24</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>net.tnemc</groupId>
            <artifactId>Reserve</artifactId>
            <version>0.1.0.10</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <build>
        <finalName>${project.name}</finalName>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.6.1</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.1.0</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <artifactSet>
                                <includes>
                                    <include>org.mcstats.bukkit</include>
                                    <include>org.bstats:*</include>
                                    <include>net.gravitydevelopment.updater</include>
                                    <include>com.j256.ormlite</include>
                                    <include>org.apache.logging.log4j</include>
                                    <include>javax.persistence</include>
                                </includes>
                            </artifactSet>
                            <relocations>
                                <relocation>
                                    <pattern>org.mcstats</pattern>
                                    <shadedPattern>com.Acrobot.ChestShop.Metrics.MCStats</shadedPattern>
                                </relocation>
                                <relocation>
                                    <pattern>org.bstats</pattern>
                                    <shadedPattern>com.Acrobot.ChestShop.Metrics.BStats</shadedPattern>
                                </relocation>
                                <relocation>
                                    <pattern>net.gravitydevelopment.updater</pattern>
                                    <shadedPattern>com.Acrobot.ChestShop.Updater</shadedPattern>
                                </relocation>
                                <relocation>
                                    <pattern>com.j256.ormlite</pattern>
                                    <shadedPattern>com.Acrobot.ChestShop.ORMlite</shadedPattern>
                                </relocation>
                                <relocation>
                                    <pattern>javax.persistence</pattern>
                                    <shadedPattern>com.Acrobot.ChestShop.javax.persistence</shadedPattern>
                                </relocation>
                            </relocations>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>

        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
    </build>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <build.number>${buildNumber}</build.number>
        <bukkit.plugin.version>${project.version} ${buildDescription}</bukkit.plugin.version>
    </properties>

    <profiles>
        <profile>
            <id>static_build_number</id>
            <activation>
                <property>
                    <name>!env.BUILD_NUMBER</name>
                </property>
            </activation>
            <properties>
                <buildNumber>0</buildNumber>
                <buildDescription>(compiled at ${maven.build.timestamp})</buildDescription>
            </properties>
        </profile>
        <profile>
            <id>dynamic_build_number</id>
            <activation>
                <property>
                    <name>env.BUILD_NUMBER</name>
                </property>
            </activation>
            <properties>
                <buildNumber>${env.BUILD_NUMBER}</buildNumber>
                <buildDescription>(build ${env.BUILD_NUMBER})</buildDescription>
            </properties>
        </profile>
    </profiles>

</project>