<?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>org.hisp.dhis.integration.sdk</groupId>
    <artifactId>dhis2-java-sdk-pom</artifactId>
    <packaging>pom</packaging>
    <version>2.1.0</version>

    <name>DHIS2 Java SDK</name>
    <url>https://github.com/dhis2/dhis2-java-sdk</url>
    <description>Java SDK for DHIS2</description>

    <licenses>
        <license>
            <name>BSD</name>
            <url>http://opensource.org/licenses/BSD-2-Clause</url>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:git@github.com:dhis2/dhis2-java-sdk.git</connection>
        <developerConnection>scm:git:git@github.com:dhis2/dhis2-java-sdk.git</developerConnection>
        <url>git@github.com:dhis2/dhis2-java-sdk.git</url>
    </scm>

    <developers>
        <developer>
            <name>HISP Centre</name>
            <email>developers@dhis2.org</email>
        </developer>
    </developers>

    <modules>
        <module>android-jackson-resource-model</module>
        <module>jackson-resource-model</module>
        <module>sdk</module>
    </modules>

    <properties>
        <maven.compiler.source>8</maven.compiler.source>
        <maven.compiler.target>8</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <jackson.version>2.15.0</jackson.version>
        <gpg.skip>true</gpg.skip>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.jetbrains.kotlin</groupId>
                <artifactId>kotlin-stdlib</artifactId>
                <version>1.9.0</version>
            </dependency>
            <dependency>
                <groupId>org.jetbrains.kotlin</groupId>
                <artifactId>kotlin-stdlib-common</artifactId>
                <version>1.9.0</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.datatype</groupId>
                <artifactId>jackson-datatype-jdk8</artifactId>
                <version>${jackson.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.5.0</version>
                <configuration>
                    <failOnError>false</failOnError>
                    <failOnWarnings>false</failOnWarnings>
                    <quiet>true</quiet>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.3.0</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>3.3.0</version>
                <executions>
                    <execution>
                        <id>enforce</id>
                        <configuration>
                            <rules>
                                <requireReleaseDeps>
                                    <onlyWhenRelease>true</onlyWhenRelease>
                                    <message>No Snapshots Allowed!</message>
                                </requireReleaseDeps>
                                <dependencyConvergence/>
                            </rules>
                        </configuration>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>3.1.0</version>
                <configuration>
                    <gpgArguments>
                        <arg>--pinentry-mode</arg>
                        <arg>loopback</arg>
                    </gpgArguments>
                </configuration>
                <executions>
                    <execution>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>io.committed</groupId>
                <artifactId>speedy-spotless-maven-plugin</artifactId>
                <version>0.1.3</version>
                <executions>
                    <execution>
                        <id>install-formatter-hook</id>
                        <goals>
                            <goal>install-hooks</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <java>
                        <eclipse>
                            <file>DHISFormatter.xml</file>
                            <version>4.9.0</version>
                        </eclipse>
                        <trimTrailingWhitespace/>
                        <removeUnusedImports/>
                        <importOrder>
                            <order>
                                java,javax,org,com
                            </order>
                        </importOrder>
                        <licenseHeader>
                            <file>license-header</file>
                        </licenseHeader>
                    </java>
                    <lineEndings>UNIX</lineEndings>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>1.6.13</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>ossrh</serverId>
                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
            </plugin>
        </plugins>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>animal-sniffer-maven-plugin</artifactId>
                    <version>1.23</version>
                    <configuration>
                        <signature>
                            <groupId>net.sf.androidscents.signature</groupId>
                            <artifactId>android-api-level-21</artifactId>
                            <version>5.0.1_r2</version>
                        </signature>
                    </configuration>
                    <executions>
                        <execution>
                            <phase>test</phase>
                            <goals>
                                <goal>check</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <distributionManagement>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
    </distributionManagement>
</project>
