<?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>
  <prerequisites>
    <maven>3.0.4</maven>
  </prerequisites>

  <groupId>com.moodysalem</groupId>
  <artifactId>phantomjs-wrapper-parent</artifactId>
  <version>3.1.3</version>
  <packaging>pom</packaging>

  <modules>
    <module>wrapper</module>
    <module>exec</module>
    <module>windows-binary</module>
    <module>linux-binary</module>
    <module>macosx-binary</module>
  </modules>

  <name>PhantomJS Wrapper Parent</name>
  <description>A Java wrapper around the PhantomJS binaries</description>
  <url>https://github.com/moodysalem/java-phantomjs-wrapper</url>

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

  <licenses>
    <license>
      <name>MIT</name>
      <url>https://opensource.org/licenses/MIT</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <scm>
    <url>https://github.com/moodysalem/jaxrs-lib</url>
    <connection>scm:git:https://github.com/moodysalem/java-phantomjs-wrapper.git</connection>
    <developerConnection>scm:git:https://github.com/moodysalem/java-phantomjs-wrapper.git</developerConnection>
    <tag>phantomjs-wrapper-parent-3.1.3</tag>
  </scm>

  <developers>
    <developer>
      <name>Moody Salem</name>
      <email>moody.salem@gmail.com</email>
      <url>https://moodysalem.com</url>
    </developer>
  </developers>

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

  <dependencyManagement>
    <dependencies>
      <!-- other module dependency -->
      <dependency>
        <groupId>com.moodysalem</groupId>
        <artifactId>phantomjs-wrapper</artifactId>
        <version>${project.version}</version>
      </dependency>

      <!-- binary module dependencies -->
      <dependency>
        <groupId>com.moodysalem</groupId>
        <artifactId>phantomjs-wrapper-windows-binary</artifactId>
        <version>${project.version}</version>
        <optional>true</optional>
      </dependency>

      <dependency>
        <groupId>com.moodysalem</groupId>
        <artifactId>phantomjs-wrapper-linux-binary</artifactId>
        <version>${project.version}</version>
        <optional>true</optional>
      </dependency>

      <dependency>
        <groupId>com.moodysalem</groupId>
        <artifactId>phantomjs-wrapper-macosx-binary</artifactId>
        <version>${project.version}</version>
        <optional>true</optional>
      </dependency>

      <!-- used for executing phantomjs binaries -->
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-exec</artifactId>
        <version>1.3</version>
      </dependency>

      <!-- TESTING dependencies below this line -->
      <dependency>
        <groupId>org.testng</groupId>
        <artifactId>testng</artifactId>
        <version>6.11</version>
        <scope>test</scope>
      </dependency>

      <!-- for testing pdf outputs -->
      <dependency>
        <groupId>org.apache.pdfbox</groupId>
        <artifactId>pdfbox</artifactId>
        <version>2.0.6</version>
        <scope>test</scope>
      </dependency>

      <!-- Facade for different logging frameworks -->
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>1.7.25</version>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-simple</artifactId>
        <version>1.7.25</version>
        <scope>test</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <pluginManagement>
      <plugins>
        <!--build using java 8-->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.6.0</version>
          <configuration>
            <source>1.8</source>
            <target>1.8</target>
          </configuration>
        </plugin>

        <!-- specify deploy version -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>2.8.2</version>
        </plugin>

        <!-- don't use regular release profile -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.5.3</version>
          <configuration>
            <autoVersionSubmodules>true</autoVersionSubmodules>
            <useReleaseProfile>false</useReleaseProfile>
            <releaseProfiles>release</releaseProfiles>
            <goals>deploy</goals>
          </configuration>
        </plugin>

        <!-- run the render class -->
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>exec-maven-plugin</artifactId>
          <version>1.6.0</version>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <!-- generate javadocs and source -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <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>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.10.4</version>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <!-- gpg sign the jars we built -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-gpg-plugin</artifactId>
        <version>1.6</version>
        <executions>
          <execution>
            <id>sign-artifacts</id>
            <phase>verify</phase>
            <goals>
              <goal>sign</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <!-- Handles the release and deploy to the staging repo with a deploy execution (nexus-staging:release) -->
      <plugin>
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>nexus-staging-maven-plugin</artifactId>
        <version>1.6.8</version>
        <extensions>true</extensions>
        <configuration>
          <serverId>ossrh</serverId>
          <nexusUrl>https://oss.sonatype.org/</nexusUrl>
          <autoReleaseAfterClose>true</autoReleaseAfterClose>
        </configuration>
      </plugin>
    </plugins>
  </build>

</project>