<?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>net.beardbot</groupId>
    <artifactId>mal-api</artifactId>
    <version>1.0.1</version>

    <name>${project.groupId}:${project.artifactId}</name>
    <description>Java binding for the official MyAnimeList API</description>
    <url>https://github.com/calne-ca/mal-api-java</url>

    <developers>
        <developer>
            <name>Joscha Düringer</name>
            <email>joscha.dueringer@beardbot.net</email>
        </developer>
    </developers>

    <licenses>
        <license>
            <name>GNU General Public License, version 3</name>
            <url>http://www.gnu.org/licenses/gpl-3.0.html</url>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:https://github.com/calne-ca/mal-api-java.git</connection>
        <developerConnection>scm:git:https://github.com/calne-ca/mal-api-java.git</developerConnection>
        <url>https://github.com/calne-ca/mal-api-java</url>
    </scm>

    <properties>
        <project.java.version>1.8</project.java.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.build.outputEncoding>UTF-8</project.build.outputEncoding>

        <inceptionYear>2018</inceptionYear>
        <maven.build.timestamp.format>yyyy</maven.build.timestamp.format>
        <currentYear>${maven.build.timestamp}</currentYear>
        <author>Joscha Düringer</author>

        <slf4j.version>1.7.25</slf4j.version>
        <jersey.version>2.27</jersey.version>
        <apache.commons.lang.version>3.0</apache.commons.lang.version>
        <apache.commons.io.version>2.5</apache.commons.io.version>
        <lombok.version>1.16.20</lombok.version>
        <wiremock.version>1.57</wiremock.version>
        <hamcrest.version>1.3</hamcrest.version>
        <junit.version>4.12</junit.version>
        <mockito.version>1.10.19</mockito.version>
        <freeportfinder.version>1.0</freeportfinder.version>

        <gpg.plugin.version>1.5</gpg.plugin.version>
        <nexus.staging.plugin.version>1.6.8</nexus.staging.plugin.version>
        <compiler.plugin.version>3.7.0</compiler.plugin.version>
        <resources.plugin.version>3.0.2</resources.plugin.version>
        <source.plugin.version>3.0.1</source.plugin.version>
        <javadoc.plugin.version>3.0.0</javadoc.plugin.version>
        <license.plugin.version>3.0</license.plugin.version>
    </properties>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
    </distributionManagement>

    <dependencies>
        <dependency>
            <groupId>org.glassfish.jersey.core</groupId>
            <artifactId>jersey-common</artifactId>
            <version>${jersey.version}</version>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jersey.inject</groupId>
            <artifactId>jersey-hk2</artifactId>
            <version>${jersey.version}</version>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jersey.connectors</groupId>
            <artifactId>jersey-apache-connector</artifactId>
            <version>${jersey.version}</version>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jersey.core</groupId>
            <artifactId>jersey-client</artifactId>
            <version>${jersey.version}</version>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jersey.media</groupId>
            <artifactId>jersey-media-moxy</artifactId>
            <version>${jersey.version}</version>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jersey.media</groupId>
            <artifactId>jersey-media-jaxb</artifactId>
            <version>${jersey.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>${apache.commons.lang.version}</version>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>${apache.commons.io.version}</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j.version}</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <version>${slf4j.version}</version>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>${lombok.version}</version>
        </dependency>
        <dependency>
            <groupId>com.github.tomakehurst</groupId>
            <artifactId>wiremock</artifactId>
            <version>${wiremock.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-all</artifactId>
            <version>${hamcrest.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>${mockito.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>me.alexpanov</groupId>
            <artifactId>free-port-finder</artifactId>
            <version>${freeportfinder.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>${gpg.plugin.version}</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>${nexus.staging.plugin.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>ossrh</serverId>
                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${compiler.plugin.version}</version>
                <configuration>
                    <source>${project.java.version}</source>
                    <target>${project.java.version}</target>
                    <encoding>${project.build.sourceEncoding}</encoding>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>${resources.plugin.version}</version>
                <configuration>
                    <encoding>${project.build.outputEncoding}</encoding>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                    <descriptorRefs>
                        <descriptorRef>jar-with-dependencies</descriptorRef>
                    </descriptorRefs>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>${source.plugin.version}</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${javadoc.plugin.version}</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>${license.plugin.version}</version>
                <configuration>
                    <header>templates/license_header.txt</header>
                    <properties>
                        <inceptionYear>${inceptionYear}</inceptionYear>
                        <latestYearOfContribution>${currentYear}</latestYearOfContribution>
                        <organization>${author}</organization>
                    </properties>
                    <includes>
                        <include>src/**/*.java</include>
                        <include>src/**/*.xml</include>
                    </includes>
                    <excludes>
                        <exclude>**/src/test/resources/**</exclude>
                        <exclude>**/src/test/out/**</exclude>
                    </excludes>
                </configuration>
                <executions>
                    <execution>
                        <id>check-license</id>
                        <phase>initialize</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>