<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://maven.apache.org/POM/4.0.0"
         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>me.kagura</groupId>
    <artifactId>harrier</artifactId>
    <version>1.0</version>
    <packaging>jar</packaging>

    <parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>7</version>
    </parent>

    <name>harrier</name>
    <url>https://github.com/KingFalse/harrier</url>
    <description>harrier</description>

    <developers>
        <developer>
            <id>KingFalse</id>
            <name>Zhuo Fang</name>
            <email>yzsl@live.com</email>
            <timezone>+8</timezone>
        </developer>
    </developers>

    <properties>
        <!-- project -->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <java.version>1.8</java.version>
        <!-- dependencies -->
        <kotlinx.coroutines.version>1.2.2</kotlinx.coroutines.version>
        <kotlin.version>1.3.41</kotlin.version>
        <junit.version>5.5.1</junit.version>
        <!-- plugins -->
        <maven-compiler-plugin.version>3.7.0</maven-compiler-plugin.version>
        <maven-surefire-plugin.version>2.20.1</maven-surefire-plugin.version>
        <maven-source-plugin.version>3.0.1</maven-source-plugin.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.jetbrains.kotlinx</groupId>
            <artifactId>kotlinx-coroutines-core</artifactId>
            <version>${kotlinx.coroutines.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-stdlib</artifactId>
            <version>${kotlin.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-test</artifactId>
            <version>${kotlin.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-reflect</artifactId>
            <version>${kotlin.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <sourceDirectory>${project.basedir}/src/main/kotlin</sourceDirectory>
        <testSourceDirectory>${project.basedir}/src/test/kotlin</testSourceDirectory>

        <plugins>
            <plugin>
                <artifactId>kotlin-maven-plugin</artifactId>
                <groupId>org.jetbrains.kotlin</groupId>
                <version>${kotlin.version}</version>
                <executions>
                    <execution>
                        <id>compile</id>
                        <phase>process-sources</phase>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>test-compile</id>
                        <phase>process-test-sources</phase>
                        <goals>
                            <goal>test-compile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.jetbrains.dokka</groupId>
                <artifactId>dokka-maven-plugin</artifactId>
                <version>0.9.18</version>
                <executions>
                    <!-- build dokka htmls and package list (for refs) -->
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>dokka</goal>
                        </goals>
                    </execution>
                    <!-- attach javadoc with dokka -->
                    <execution>
                        <id>attach-javadocs</id>
                        <phase>package</phase>
                        <goals>
                            <goal>javadocJar</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <sourceLinks>
                        <link>
                            <dir>${project.basedir}</dir>
                            <url>https://github.com/KingFalse/harrier</url>
                            <urlSuffix>#L</urlSuffix>
                        </link>
                    </sourceLinks>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <pluginRepositories>
        <pluginRepository>
            <id>jcenter</id>
            <name>JCenter</name>
            <url>https://jcenter.bintray.com/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
        </pluginRepository>
    </pluginRepositories>

    <scm>
        <connection>scm:git:git@github.com:KingFalse/harrier.git</connection>
        <developerConnection>scm:git:git@github.com:KingFalse/harrier.git</developerConnection>
        <url>https://github.com/KingFalse/harrier.git</url>
    </scm>

    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/KingFalse/harrier/issues</url>
    </issueManagement>

    <licenses>
        <license>
            <name>The MIT License</name>
            <url>https://github.com/KingFalse/harrier/blob/master/LICENSE</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <distributionManagement>
        <snapshotRepository>
            <id>sonatype-nexus-snapshots</id>
            <name>Sonatype Nexus Snapshots</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
        </snapshotRepository>
        <repository>
            <id>sonatype-nexus-staging</id>
            <name>Nexus Release Repository</name>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

</project>
