<?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>

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

    <groupId>de.knightsoft-net</groupId>
    <artifactId>dispatch-rest-delegates</artifactId>
    <version>1.7</version>
    <packaging>jar</packaging>
    <name>Rest-Dispatch Resource Delegates</name>
    <description>Allow Rest-Dispatch resources to return their raw result type directly.</description>
    <inceptionYear>2014</inceptionYear>
    <url>http://arcbees.github.io/GWTP/</url>

    <properties>
        <gwtp.version>1.7</gwtp.version>
        <gwt.version>2.12.1</gwt.version>
        <mockito.version>4.11.0</mockito.version>
        <junit.version>4.13.2</junit.version>

        <maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
        <maven-checkstyle-plugin.version>3.6.0</maven-checkstyle-plugin.version>
        <checkstyle.version>10.20.1</checkstyle.version>
        <maven-javadoc-plugin.version>3.11.1</maven-javadoc-plugin.version>

        <target.jdk>11</target.jdk>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    </properties>

    <licenses>
        <license>
            <name>Apache 2</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
            <comments>A business-friendly OSS license</comments>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:git@github.com:ManfredTremmel/gwtp-extensions.git</connection>
        <developerConnection>scm:git:git@github.com:ManfredTremmel/gwtp-extensions.git</developerConnection>
        <url>https://github.com/ManfredTremmel/gwtp-extensions</url>
    </scm>

    <issueManagement>
        <url>https://github.com/ManfredTremmel/gwtp-extensions/issues</url>
        <system>Github Issues</system>
    </issueManagement>

    <ciManagement>
        <system>Team City</system>
        <url>http://teamcity.arcbees.com/project.html?projectId=Gwtp_GwtpExtensions_RestDispatchDelegates</url>
    </ciManagement>

    <dependencies>
        <dependency>
            <groupId>de.knightsoft-net</groupId>
            <artifactId>gwtp-dispatch-rest</artifactId>
            <version>${gwtp.version}</version>
        </dependency>
        <dependency>
            <groupId>org.gwtproject</groupId>
            <artifactId>gwt-user</artifactId>
            <version>${gwt.version}</version>
        </dependency>
        <dependency>
            <groupId>org.gwtproject</groupId>
            <artifactId>gwt-dev</artifactId>
            <version>${gwt.version}</version>
        </dependency>

        <!-- For testing tools -->
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>${mockito.version}</version>
            <scope>compile</scope>
            <optional>true</optional>
        </dependency>

        <!-- Test dependencies -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <resources>
            <!-- Bundle sources with the jar, so they are visible to GWT's compiler -->
            <resource>
                <directory>src/main/java</directory>
                <includes>
                    <include>**/*.java</include>
                </includes>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
            </resource>
        </resources>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven-compiler-plugin.version}</version>

                <configuration>
                    <source>${target.jdk}</source>
                    <target>${target.jdk}</target>
                    <encoding>${project.build.sourceEncoding}</encoding>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>${maven-checkstyle-plugin.version}</version>

                <configuration>
                    <configLocation>/codequality/checkstyle.xml</configLocation>
                    <suppressionsLocation>/codequality/suppressions.xml</suppressionsLocation>
                    <propertyExpansion>basedir=${basedir}</propertyExpansion>
                    <consoleOutput>true</consoleOutput>
                    <failsOnError>true</failsOnError>
                    <linkXRef>false</linkXRef>
                    <includeTestSourceDirectory>true</includeTestSourceDirectory>
                </configuration>

                <dependencies>
                    <dependency>
                        <groupId>com.puppycrawl.tools</groupId>
                        <artifactId>checkstyle</artifactId>
                        <version>${checkstyle.version}</version>
                    </dependency>
                </dependencies>

                <executions>
                    <execution>
                        <id>validate</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>checkstyle</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${maven-javadoc-plugin.version}</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <configuration>
                            <additionalparam>-Xdoclint:none</additionalparam>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>1.7.0</version>
                <extensions>true</extensions>
                <configuration>
                    <!-- The Base URL of Nexus instance where we want to stage -->
                    <serverId>sonatype-nexus-staging</serverId>
                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <configuration>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <useReleaseProfile>false</useReleaseProfile>
                    <releaseProfiles>release</releaseProfiles>
                    <arguments>-Psonatype-oss-release -Prelease -Dgpg.passphrase=${gpg.passphrase}</arguments>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
