<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>

  <parent>
    <groupId>org.sonatype.oss</groupId>
    <artifactId>oss-parent</artifactId>
    <version>7</version>
  </parent>

  <groupId>com.pusher</groupId>
  <artifactId>pusher-http-java</artifactId>
  <name>Pusher HTTP Client</name>
  <version>1.3.0</version>
  <url>http://github.com/pusher/pusher-http-java</url>

  <description>
    This is a Java library for interacting with Pusher.com's HTTP API
  </description>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <!-- github server corresponds to entry in ~/.m2/settings.xml -->
    <github.global.server>github</github.global.server>
    <maven.compiler.source>8</maven.compiler.source>
    <maven.compiler.target>8</maven.compiler.target>
  </properties>

  <scm>
    <url>scm:git:git@github.com:pusher/pusher-http-java</url>
    <connection>scm:git:git@github.com:pusher/pusher-http-java</connection>
    <developerConnection>scm:git:git@github.com:pusher/pusher-http-java</developerConnection>
  </scm>

  <licenses>
    <license>
      <name>MIT</name>
      <url>https://raw.github.com/pusher/pusher-http-java/master/LICENCE.txt</url>
    </license>
  </licenses>

  <organization>
    <name>Pusher</name>
    <url>http://pusher.com</url>
  </organization>

  <issueManagement>
    <system>Github</system>
    <url>https://github.com/pusher/pusher-http-java/issues</url>
  </issueManagement>

  <developers>
      <developer>
          <id>mike</id>
          <name>Mike Pye</name>
          <email>mike@pusher.com</email>
          <organization>Pusher</organization>
          <organizationUrl>http://pusher.com</organizationUrl>
          <roles>
              <role>maintainer</role>
              <role>developer</role>
          </roles>
          <timezone>Europe/London</timezone>
      </developer>
  </developers>

  <packaging>jar</packaging>

  <profiles>
    <profile>
      <id>release-sign-artifacts</id>
      <activation>
        <property>
          <name>gpg.passphrase</name>
        </property>
      </activation>
      <properties>
        <gpg.keyname>C68187EB</gpg.keyname>
      </properties>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.4</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <build>
    <finalName>${project.artifactId}-${project.version}</finalName>
    <outputDirectory>target/classes</outputDirectory>
    <testOutputDirectory>target/test-classes</testOutputDirectory>
    <directory>target</directory>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <filtering>true</filtering>
      </resource>
    </resources>
    <testResources>
      <testResource>
        <directory>src/test/resources</directory>
      </testResource>
    </testResources>

    <plugins>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>3.3.0</version>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <phase>package</phase>
            <goals>
              <goal>jar</goal>
            </goals>
            <configuration>
              <stylesheetfile>${basedir}/src/main/javadoc/css/styles.css</stylesheetfile>
              <groups>
                <group>
                  <title>${project.groupId} ${project.artifactId}</title>
                  <packages>${project.groupId}.${project.artifactId}</packages>
                </group>
              </groups>
              <linksource>true</linksource>
              <links>
                <link>http://download.oracle.com/javase/6/docs/api</link>
              </links>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>com.github.github</groupId>
        <artifactId>site-maven-plugin</artifactId>
        <version>0.11</version>
        <configuration>
          <server>github</server>
          <repositoryName>pusher-http-java</repositoryName> <!-- github repo name -->
          <repositoryOwner>pusher</repositoryOwner> <!-- github username -->
          <noJekyll>true</noJekyll> <!-- disable webpage processing -->
        </configuration>
        <executions>
          <!-- run site-maven-plugin's 'site' target as part of the build's normal 'deploy' phase -->
          <execution>
            <id>javadoc</id>
            <configuration>
              <message>JavaDoc gh-pages for ${project.version}</message><!-- git commit message -->
              <outputDirectory>${project.build.directory}/apidocs</outputDirectory> <!-- matches distribution management repository url above -->
              <branch>refs/heads/gh-pages</branch> <!-- remote branch name -->
              <includes>
                <include>**/*</include>
              </includes>
            </configuration>
            <goals>
              <goal>site</goal>
            </goals>
            <phase>deploy</phase>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>2.2.1</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <!-- latest version (2.20.1) does not work well with JUnit5 -->
        <version>2.19.1</version>
        <dependencies>
          <dependency>
            <groupId>org.junit.platform</groupId>
            <artifactId>junit-platform-surefire-provider</artifactId>
            <version>1.0.3</version>
          </dependency>
          <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>5.0.3</version>
          </dependency>
        </dependencies>
      </plugin>
    </plugins>
  </build>

  <dependencies>
    <dependency>
      <groupId>org.apache.httpcomponents</groupId>
      <artifactId>httpclient</artifactId>
      <version>4.5.13</version>
    </dependency>
    <dependency>
      <groupId>org.asynchttpclient</groupId>
      <artifactId>async-http-client</artifactId>
      <version>2.12.3</version>
    </dependency>
    <dependency>
      <groupId>com.google.code.gson</groupId>
      <artifactId>gson</artifactId>
      <version>2.2.4</version>
    </dependency>

    <dependency>
      <groupId>org.apache.httpcomponents</groupId>
      <artifactId>httpclient</artifactId>
      <version>4.5.13</version>
      <classifier>tests</classifier>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest-all</artifactId>
      <version>1.3</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jmock</groupId>
      <artifactId>jmock-junit5</artifactId>
      <version>2.12.0</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
</project>
