<?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>cd.go.plugin</groupId>
    <artifactId>go-plugin-api</artifactId>
    <version>21.1.0</version>
    <packaging>pom</packaging>

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

    <name>API for plugins of GoCD</name>
    <description>The APIs described here are needed for developing plugins for GoCD - A continuous delivery server</description>
    <url>http://gocd.org</url>

    <licenses>
        <license>
            <name>The Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>GoCD Team</name>
            <email>go-cd@googlegroups.com</email>
            <organization>ThoughtWorks, Inc.</organization>
            <organizationUrl>http://go.cd</organizationUrl>
        </developer>

        <developer>
            <name>ThoughtWorks</name>
            <email>support@thoughtworks.com</email>
            <organization>ThoughtWorks, Inc.</organization>
            <organizationUrl>http://www.thoughtworks.com</organizationUrl>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:https://github.com/gocd/gocd</connection>
        <developerConnection>scm:git:https://github.com/gocd/gocd</developerConnection>
        <url>https://github.com/gocd/gocd.git</url>
    </scm>

    <build>
        <plugins>
            <!-- Tell Maven which files to consider as artifacts, for signing and deployment. -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>1.9.1</version>
                <executions>
                    <execution>
                        <id>attach-artifacts</id>
                        <phase>package</phase>
                        <goals>
                            <goal>attach-artifact</goal>
                        </goals>
                        <configuration>
                            <artifacts>
                                <artifact>
                                    <file>go-plugin-api-21.1.0.jar</file>
                                    <type>jar</type>
                                </artifact>
                                <artifact>
                                    <file>go-plugin-api-21.1.0-javadoc.jar</file>
                                    <type>jar</type>
                                    <classifier>javadoc</classifier>
                                </artifact>
                                <artifact>
                                    <file>go-plugin-api-21.1.0-sources.jar</file>
                                    <type>jar</type>
                                    <classifier>sources</classifier>
                                </artifact>
                            </artifacts>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <!-- Use GPG and sign all the artifacts. -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>1.5</version>
                <configuration>
                    <keyname>D8843F288816C449</keyname>
                    <gpgArguments>
                        <arg>--batch</arg>
                    </gpgArguments>
                </configuration>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- Upload it to Nexus. -->
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>1.6.3</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>nexus-oss</serverId>
                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>${autoReleaseToCentral}</autoReleaseAfterClose>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
