<?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.heroku.sdk</groupId>
  <artifactId>heroku-sdk-parent</artifactId>
  <version>2.0.16</version>
  <modules>
    <module>heroku-deploy</module>
    <module>maven-plugin</module>
    <module>complete</module>
  </modules>

  <packaging>pom</packaging>

  <name>Heroku SDK Parent</name>
  <description>
    Parent project for Heroku SDK tools and libraries.
  </description>

  <url>http://github.com/heroku/heroku-maven-plugin</url>

  <scm>
    <connection>scm:git:git://github.com/heroku/heroku-maven-plugin.git</connection>
    <developerConnection>scm:git:ssh://git@github.com/heroku/heroku-maven-plugin.git</developerConnection>
    <url>https://github.com/heroku/heroku-maven-plugin</url>
    <tag>heroku-sdk-parent-2.0.16</tag>
  </scm>

  <distributionManagement>
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
  </distributionManagement>

  <licenses>
    <license>
      <name>MIT</name>
      <url>http://www.opensource.org/licenses/mit-license.php</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <developers>
    <developer>
      <id>jkutner</id>
      <name>Joe Kutner</name>
      <email>joe@heroku.com</email>
      <timezone>CST</timezone>
    </developer>
  </developers>

  <properties>
    <heroku-deploy.version>${project.version}</heroku-deploy.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <invoker.skip>true</invoker.skip>
    <maven.version>3.5.0</maven.version>
    <nexus-staging.plugin.version>1.6.8</nexus-staging.plugin.version>
    <release.plugin.version>2.5.3</release.plugin.version>
    <gpg.plugin.version>1.6</gpg.plugin.version>
    <invoker.plugin.version>2.0.0</invoker.plugin.version>
    <javadoc.plugin.version>2.10.4</javadoc.plugin.version>
    <source.plugin.version>3.0.1</source.plugin.version>
    <jackson.version>2.10.1</jackson.version>
    <heroku.jar.version>0.37</heroku.jar.version>
    <commons-compress.version>1.19</commons-compress.version>
    <commons-io.version>2.6</commons-io.version>
    <commons-text.version>1.6</commons-text.version>
    <jgit.version>4.11.7.201903122105-r</jgit.version>
    <httpclient.version>4.5.8</httpclient.version>
    <junit.version>4.12</junit.version>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-core</artifactId>
        <version>${jackson.version}</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-databind</artifactId>
        <version>${jackson.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-compress</artifactId>
        <version>${commons-compress.version}</version>
      </dependency>
      <dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>${commons-io.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-text</artifactId>
        <version>${commons-text.version}</version>
      </dependency>
      <dependency>
        <groupId>org.eclipse.jgit</groupId>
        <artifactId>org.eclipse.jgit</artifactId>
        <version>${jgit.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpclient</artifactId>
        <version>${httpclient.version}</version>
      </dependency>
      <dependency>
        <groupId>com.heroku.api</groupId>
        <artifactId>heroku-api</artifactId>
        <version>${heroku.jar.version}</version>
      </dependency>
      <dependency>
        <groupId>com.heroku.api</groupId>
        <artifactId>heroku-json-jackson</artifactId>
        <version>${heroku.jar.version}</version>
      </dependency>
      <dependency>
        <groupId>com.heroku.api</groupId>
        <artifactId>heroku-http-apache</artifactId>
        <version>${heroku.jar.version}</version>
      </dependency>
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>${junit.version}</version>
        <scope>test</scope>
      </dependency>

    </dependencies>
  </dependencyManagement>

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.7.0</version>
        <configuration>
          <source>1.8</source>
          <target>1.8</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>nexus-staging-maven-plugin</artifactId>
        <version>${nexus-staging.plugin.version}</version>
        <extensions>true</extensions>
        <configuration>
          <serverId>ossrh</serverId>
          <nexusUrl>https://oss.sonatype.org/</nexusUrl>
          <autoReleaseAfterClose>true</autoReleaseAfterClose>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-release-plugin</artifactId>
        <version>${release.plugin.version}</version>
        <configuration>
          <autoVersionSubmodules>true</autoVersionSubmodules>
          <useReleaseProfile>false</useReleaseProfile>
          <releaseProfiles>release</releaseProfiles>
          <goals>deploy</goals>
        </configuration>
        <dependencies>
          <dependency>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>${gpg.plugin.version}</version>
          </dependency>
        </dependencies>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>release</id>
      <activation>
        <activeByDefault>false</activeByDefault>
        <property>
          <name>prepareForCentral</name>
          <value>true</value>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-source-plugin</artifactId>
            <version>${source.plugin.version}</version>
            <executions>
              <execution>
                <id>attach-source</id>
                <phase>package</phase>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>${javadoc.plugin.version}</version>
            <executions>
              <execution>
                <id>attach-javadoc</id>
                <phase>package</phase>
                <goals>
                  <goal>jar</goal>
                </goals>
                <configuration>
                  <additionalparam>-Xdoclint:none</additionalparam>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>${gpg.plugin.version}</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>package</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <gpgArguments>
                <arg>--pinentry-mode</arg>
                <arg>loopback</arg>
              </gpgArguments>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
