<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
         xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.github.jcustenborder</groupId>
    <artifactId>maven-central-parent</artifactId>
    <version>1.0.0</version>
    <packaging>pom</packaging>
    <name>maven-central-parent</name>
    <description>A pom for deploying to maven central.</description>
    <url>https://github.com/jcustenborder/maven-central-parent</url>
    <inceptionYear>2017</inceptionYear>
    <licenses>
        <license>
            <name>Apache License 2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    <developers>
        <developer>
            <name>Jeremy Custenborder</name>
            <email>jeremy@confluent.io</email>
            <url>https://github.com/jcustenborder</url>
            <roles>
                <role>maintainer</role>
            </roles>
        </developer>
    </developers>
    <scm>
        <connection>scm:git:https://github.com/jcustenborder/maven-central-parent.git</connection>
        <developerConnection>scm:git:git@github.com:jcustenborder/maven-central-parent.git</developerConnection>
        <url>https://github.com/jcustenborder/maven-central-parent</url>
    </scm>
    <issueManagement>
        <system>github</system>
        <url>https://github.com/jcustenborder/maven-central-parent/issues</url>
    </issueManagement>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>
    <build>
        <plugins>
            <plugin>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.0.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.10.4</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <profiles>
        <profile>
            <id>maven-central</id>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <configuration>
                                    <keyname>${gpg.keyname}</keyname>
                                    <passphraseServerId>${gpg.keyname}</passphraseServerId>
                                    <gpgArguments>
                                        <arg>--pinentry-mode</arg>
                                        <arg>loopback</arg>
                                    </gpgArguments>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.7</version>
                        <extensions>true</extensions>
                        <executions>
                            <execution>
                                <id>deploy-to-sonatype</id>
                                <phase>deploy</phase>
                                <goals>
                                    <goal>deploy</goal>
                                    <goal>release</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <serverId>oss.sonatype.org</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <description>${project.version}</description>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
            <distributionManagement>
                <repository>
                    <id>oss.sonatype.org</id>
                    <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
                </repository>
                <snapshotRepository>
                    <id>oss.sonatype.org</id>
                    <url>https://oss.sonatype.org/content/repositories/snapshots</url>
                </snapshotRepository>
            </distributionManagement>
        </profile>
    </profiles>
</project>
