<!--

    The MIT License
    Copyright © 2015 Pixel Outlaw

    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the Software is
    furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in
    all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
    THE SOFTWARE.

-->
<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>io.pixeloutlaw</groupId>
    <artifactId>spigot-plugin-parent</artifactId>
    <version>1.13.2.2</version>
    <packaging>pom</packaging>

    <name>spigot-plugin-parent</name>
    <description>A parent project for all of Pixel Outlaw's Spigot plugins.</description>

    <inceptionYear>2015</inceptionYear>
    <url>https://github.com/PixelOutlaw/spigot-plugin-parent</url>

    <scm>
        <connection>scm:git:https://github.com/PixelOutlaw/spigot-plugin-parent.git</connection>
        <developerConnection>scm:git:https://github.com/PixelOutlaw/spigot-plugin-parent.git</developerConnection>
        <url>https://github.com/PixelOutlaw/spigot-plugin-parent.git</url>
        <tag>HEAD</tag>
    </scm>

    <licenses>
        <license>
            <name>MIT License</name>
            <url>
                https://raw.githubusercontent.com/PixelOutlaw/spigot-plugin-parent/develop/LICENSE
            </url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>ToppleTheNun</id>
            <name>Richard Harrah</name>
            <email>topplethenun@pixeloutlaw.io</email>
        </developer>
    </developers>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.build.javaVersion>1.8</project.build.javaVersion>
        <project.build.scmBranch>UNKNOWN</project.build.scmBranch>
        <project.build.scmCommit>UNKNOWN</project.build.scmCommit>
        <kotlin.version>1.3.11</kotlin.version>
        <slf4j.version>1.7.25</slf4j.version>
    </properties>

    <repositories>
        <repository>
            <id>destroystokyo-repo</id>
            <url>https://repo.destroystokyo.com/repository/maven-public/</url>
        </repository>
        <repository>
            <id>spigot-repo</id>
            <name>Spigot Repository</name>
            <url>https://hub.spigotmc.org/nexus/content/groups/public</url>
        </repository>
        <repository>
            <id>jitpack.io</id>
            <name>Jitpack</name>
            <url>https://jitpack.io</url>
        </repository>
    </repositories>

    <pluginRepositories>
        <pluginRepository>
            <id>jcenter</id>
            <name>JCenter</name>
            <url>https://jcenter.bintray.com/</url>
        </pluginRepository>
    </pluginRepositories>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.destroystokyo.paper</groupId>
                <artifactId>paper-api</artifactId>
                <version>1.13.2-R0.1-SNAPSHOT</version>
            </dependency>
            <dependency>
                <groupId>org.spigotmc</groupId>
                <artifactId>spigot-api</artifactId>
                <version>1.13.2-R0.1-SNAPSHOT</version>
            </dependency>
            <dependency>
                <groupId>org.jetbrains.kotlin</groupId>
                <artifactId>kotlin-stdlib-jdk8</artifactId>
                <version>${kotlin.version}</version>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.12</version>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>2.23.4</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>1.7.25</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <defaultGoal>install</defaultGoal>
        <resources>
            <resource>
                <targetPath>.</targetPath>
                <directory>${project.basedir}/src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>3.0.0-M2</version>
                <executions>
                    <execution>
                        <id>enforce-maven</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireMavenVersion>
                                    <version>3.0</version>
                                </requireMavenVersion>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.jetbrains.kotlin</groupId>
                <artifactId>kotlin-maven-plugin</artifactId>
                <version>${kotlin.version}</version>
                <executions>
                    <execution>
                        <id>compile</id>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                        <configuration>
                            <sourceDirs>
                                <sourceDir>${project.basedir}/src/main/kotlin</sourceDir>
                                <sourceDir>${project.basedir}/src/main/java</sourceDir>
                            </sourceDirs>
                        </configuration>
                    </execution>
                    <execution>
                        <id>test-compile</id>
                        <goals>
                            <goal>test-compile</goal>
                        </goals>
                        <configuration>
                            <sourceDirs>
                                <sourceDir>${project.basedir}/src/test/kotlin</sourceDir>
                                <sourceDir>${project.basedir}/src/test/java</sourceDir>
                            </sourceDirs>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.7.0</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
                <executions>
                    <!-- Replacing default-compile as it is treated specially by maven -->
                    <execution>
                        <id>default-compile</id>
                        <phase>none</phase>
                    </execution>
                    <!-- Replacing default-testCompile as it is treated specially by maven -->
                    <execution>
                        <id>default-testCompile</id>
                        <phase>none</phase>
                    </execution>
                    <execution>
                        <id>java-compile</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>java-test-compile</id>
                        <phase>test-compile</phase>
                        <goals>
                            <goal>testCompile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>3.0</version>
                <configuration>
                    <header>com/mycila/maven/plugin/license/templates/MIT.txt</header>
                    <properties>
                        <owner>Pixel Outlaw</owner>
                        <email>topplethenunnery@gmail.com</email>
                    </properties>
                    <includes>
                        <include>pom.xml</include>
                        <include>src/main/java/com/tealcubegames/**</include>
                        <include>src/main/kotlin/com/tealcubegames/**</include>
                        <include>src/main/java/com/tealcube/**</include>
                        <include>src/main/kotlin/com/tealcube/**</include>
                        <include>src/main/java/io/pixeloutlaw/**</include>
                        <include>src/main/kotlin/io/pixeloutlaw/**</include>
                    </includes>
                    <excludes>
                        <exclude>**/README</exclude>
                        <exclude>src/test/resources/**</exclude>
                        <exclude>src/main/resources/**</exclude>
                    </excludes>
                    <useDefaultMapping>false</useDefaultMapping>
                    <mapping>
                        <java>SLASHSTAR_STYLE</java>
                        <kt>SLASHSTAR_STYLE</kt>
                        <xml>XML_STYLE</xml>
                    </mapping>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>external.atlassian.jgitflow</groupId>
                <artifactId>jgitflow-maven-plugin</artifactId>
                <version>1.0-m5.1</version>
                <configuration>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <allowSnapshots>true</allowSnapshots>
                    <noDeploy>true</noDeploy>
                    <flowInitContext>
                        <masterBranchName>master</masterBranchName>
                        <developBranchName>develop</developBranchName>
                        <featureBranchPrefix>feature/</featureBranchPrefix>
                        <releaseBranchPrefix>release/</releaseBranchPrefix>
                        <hotfixBranchPrefix>hotfix/</hotfixBranchPrefix>
                    </flowInitContext>
                    <tagMessage>[ci skip] tagging release ${project.version}</tagMessage>
                    <useReleaseProfile>false</useReleaseProfile>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.0.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.jetbrains.dokka</groupId>
                <artifactId>dokka-maven-plugin</artifactId>
                <version>0.9.17</version>
                <configuration>
                    <sourceRoots>
                        <root>
                            <path>src/main/kotlin</path>
                            <!-- See platforms section of documentation -->
                            <platforms>JVM</platforms>
                        </root>
                        <root>
                            <path>src/main/java</path>
                            <!-- See platforms section of documentation -->
                            <platforms>JVM</platforms>
                        </root>
                    </sourceRoots>
                </configuration>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>javadocJar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>git</id>
            <activation>
                <file>
                    <exists>${basedir}/.git</exists>
                </file>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>pl.project13.maven</groupId>
                        <artifactId>git-commit-id-plugin</artifactId>
                        <version>2.2.4</version>
                        <executions>
                            <execution>
                                <id>git-commit-id</id>
                                <phase>validate</phase>
                                <goals>
                                    <goal>revision</goal>
                                </goals>
                                <configuration>
                                    <dotGitDirectory>${project.basedir}/.git</dotGitDirectory>
                                    <skipPoms>false</skipPoms>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>bintray-distribution</id>
            <distributionManagement>
                <repository>
                    <id>bintray-pixeloutlaw-pixeloutlaw-jars</id>
                    <name>pixeloutlaw-pixeloutlaw-jars</name>
                    <url>https://api.bintray.com/maven/pixeloutlaw/pixeloutlaw-jars/spigot-plugin-parent/;publish=1</url>
                </repository>
            </distributionManagement>
        </profile>
    </profiles>

</project>
