<?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.10duke.client.parent</groupId>
    <artifactId>maven</artifactId>
    <version>1.1.0</version>
    <packaging>pom</packaging>

    <name>com.10duke.client.parent:maven</name>
    <description>The root parent-POM for 10Duke java client</description>
    <url>https://github.com/10Duke/10duke-java-client</url>

    <licenses>
        <license>
            <name>MIT</name>
            <url>https://opensource.org/licenses/MIT</url>
        </license>
    </licenses>
    
    <developers>
        <developer>
            <name>10Duke Opensource</name>
            <email>opensource@10duke.com</email>
            <organization>10Duke</organization>
            <organizationUrl>https://www.10duke.com</organizationUrl>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git://github.com/10duke/10duke-java-client.git</connection>
        <developerConnection>scm:git:ssh://github.com:10duke/10duke-java-client.git</developerConnection>
        <url>https://github.com/10duke/10duke-java-client</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>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <xd.maven-gpg-plugin.version>1.6</xd.maven-gpg-plugin.version>
        <xd.maven-javadoc-plugin.version>3.1.1</xd.maven-javadoc-plugin.version>
        <xd.nexus-staging-maven-plugin.version>1.6.8</xd.nexus-staging-maven-plugin.version>        
        <xd.versions-maven-plugin.version>2.7</xd.versions-maven-plugin.version>
    </properties>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>${xd.maven-gpg-plugin.version}</version>
                </plugin>
               <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>${xd.maven-javadoc-plugin.version}</version>
                    <executions>
                        <execution>
                            <id>default-cli</id>
                            <goals>
                                <goal>aggregate</goal>
                            </goals>
                            <configuration>
                                <excludePackageNames>*.testutils</excludePackageNames>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                 <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>versions-maven-plugin</artifactId>
                    <version>${xd.versions-maven-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.sonatype.plugins</groupId>
                    <artifactId>nexus-staging-maven-plugin</artifactId>
                    <version>${xd.nexus-staging-maven-plugin.version}</version>
                    <extensions>true</extensions>
                </plugin>                
            </plugins>
        </pluginManagement>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <configuration>
                                    <executable>gpg2</executable>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
