<!-- *************************GO-LICENSE-START******************************
 * Copyright 2014 ThoughtWorks, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *************************GO-LICENSE-END******************************* -->

<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>14.4.0</version>
  <packaging>pom</packaging>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <AUTO_RELEASE_TO_CENTRAL>false</AUTO_RELEASE_TO_CENTRAL>
  </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://go.cd</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>Aravind SV</name>
      <email>arvind@thoughtworks.com</email>
      <organization>ThoughtWorks</organization>
      <organizationUrl>http://www.thoughtworks.com</organizationUrl>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:git@github.com:gocd/gocd.git</connection>
    <developerConnection>scm:git:git@github.com:gocd/gocd.git</developerConnection>
    <url>git@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>artifacts/go-plugin-api-14.4.0.jar</file>
                  <type>jar</type>
                </artifact>
                <artifact>
                  <file>artifacts/go-plugin-api-14.4.0-javadoc.jar</file>
                  <type>jar</type>
                  <classifier>javadoc</classifier>
                </artifact>
                <artifact>
                  <file>artifacts/go-plugin-api-14.4.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>${AUTO_RELEASE_TO_CENTRAL}</autoReleaseAfterClose>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
