<?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>com.manywho.sdk</groupId>
    <artifactId>project</artifactId>
    <version>2.0.0</version>
    <packaging>pom</packaging>

    <modules>
        <module>sdk-api</module>
        <module>sdk-client</module>
        <module>sdk-example</module>
        <module>sdk-services</module>
        <module>sdk-server</module>
        <module>sdk-server-lambda</module>
        <module>sdk-server-lambda-testing</module>
        <module>sdk-server-resteasy</module>
        <module>sdk-server-servlet3</module>
        <module>sdk-server-undertow</module>
    </modules>

    <properties>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <version.jackson>2.9.7</version.jackson>
        <version.resteasy>3.5.1.Final</version.resteasy>
    </properties>

    <name>${project.groupId}:${project.artifactId}</name>
    <description>Java SDK for building services to integrate with the ManyWho platform</description>
    <url>https://github.com/manywho/sdk-java</url>

    <licenses>
        <license>
            <name>MIT License</name>
            <url>http://www.opensource.org/licenses/mit-license.php</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Jonjo McKay</name>
            <email>jonjo.mckay@manywho.com</email>
            <organization>ManyWho</organization>
            <organizationUrl>https://www.manywho.com</organizationUrl>
        </developer>
        <developer>
            <name>Jose Collazzi</name>
            <email>jose.collazzi@manywho.com</email>
            <organization>ManyWho</organization>
            <organizationUrl>https://www.manywho.com</organizationUrl>
        </developer>
    </developers>

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

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

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.5</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-source-plugin</artifactId>
                        <version>2.4</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.10.2</version>
                        <configuration>
                            <nohelp>true</nohelp>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-scm-publish-plugin</artifactId>
                        <version>1.1</version>
                        <configuration>
                            <checkoutDirectory>${project.build.directory}/scmpublish</checkoutDirectory>
                            <checkinComment>Publishing javadoc for ${project.artifactId}:${project.version}</checkinComment>
                            <content>${project.reporting.outputDirectory}/apidocs</content>
                            <skipDeletedFiles>true</skipDeletedFiles>
                            <pubScmUrl>scm:git:git@github.com:manywho/sdk-java.git</pubScmUrl>
                            <scmBranch>gh-pages</scmBranch>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <configuration>
                                    <gpgArguments>
                                        <arg>--pinentry-mode</arg>
                                        <arg>loopback</arg>
                                    </gpgArguments>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
