<?xml version="1.0"?>
<!--
  ~ Copyright (c) 2011-2014 The original author or authors
  ~
  ~  All rights reserved. This program and the accompanying materials
  ~  are made available under the terms of the Eclipse Public License v1.0
  ~  and Apache License v2.0 which accompanies this distribution.
  ~
  ~      The Eclipse Public License is available at
  ~      http://www.eclipse.org/legal/epl-v10.html
  ~
  ~      The Apache License v2.0 is available at
  ~      http://www.opensource.org/licenses/apache2.0.php
  ~
  ~  You may elect to redistribute this code under either of these licenses.
  -->

<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>com.julienviet</groupId>
    <artifactId>parent</artifactId>
    <version>1</version>
  </parent>

  <groupId>io.reactiverse</groupId>
  <artifactId>reactiverse-child-process</artifactId>
  <version>3.0.0</version>

  <name>Child Process extension for Vert.x</name>
  <url>https://github.com/reactiverse/childprocess-vertx-ext</url>
  <description>Spawn child processes from Vert.x</description>

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

  <scm>
    <connection>scm:git:git@github.com:reactiverse/childprocess-vertx-ext.git</connection>
    <developerConnection>scm:git:git@github.com:reactiverse/childprocess-vertx-ext.git</developerConnection>
    <url>git@github.com:reactiverse/childprocess-vertx-ext.git</url>
  </scm>

  <developers>
    <developer>
      <name>Julien Viet</name>
      <email>julien@julienviet.com</email>
    </developer>
  </developers>

  <properties>
    <vertx.version>5.0.0</vertx.version>
    <generated.dir>${project.basedir}/src/main/generated</generated.dir>
    <docs.dir>${project.basedir}/src/main/docs</docs.dir>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>io.vertx</groupId>
        <artifactId>vertx-dependencies</artifactId>
        <version>${vertx.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
    <dependency>
      <groupId>com.zaxxer</groupId>
      <artifactId>nuprocess</artifactId>
      <version>3.0.0</version>
    </dependency>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-core</artifactId>
    </dependency>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-codegen-api</artifactId>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-codegen-json</artifactId>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-docgen-api</artifactId>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-core</artifactId>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-unit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
      <version>4.13.1</version>
    </dependency>
  </dependencies>

  <build>

    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>${maven.compiler.plugin.version}</version>
          <executions>
            <execution>
              <id>default-compile</id>
              <configuration>
                <generatedSourcesDirectory>${project.basedir/src/main/generated}</generatedSourcesDirectory>
                <annotationProcessorPaths>
                  <annotationProcessorPath>
                    <groupId>io.vertx</groupId>
                    <artifactId>vertx-codegen</artifactId>
                    <classifier>processor</classifier>
                    <version>${vertx.version}</version>
                  </annotationProcessorPath>
                  <annotationProcessorPath>
                    <groupId>io.vertx</groupId>
                    <artifactId>vertx-docgen-processor</artifactId>
                    <classifier>processor</classifier>
                    <version>0.9.8</version>
                  </annotationProcessorPath>
                </annotationProcessorPaths>
                <compilerArgs>
                  <arg>-Acodegen.output=${project.basedir}/src/main</arg>
                  <arg>-Adocgen.source=${docs.dir}/*.md</arg>
                  <arg>-Adocgen.output=${project.basedir}/docs/guide/$lang</arg>
                  <arg>-Adocgen.syntax=markdown</arg>
                  <arg>-Amaven.groupId=${project.groupId}</arg>
                  <arg>-Amaven.artifactId=${project.artifactId}</arg>
                  <arg>-Amaven.version=${project.version}</arg>
                </compilerArgs>
              </configuration>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>${maven.javadoc.plugin.version}</version>
        <configuration>
          <sourcepath>${project.build.sourceDirectory};${project.build.directory}/generated-sources/annotations</sourcepath>
          <sourceFileIncludes>
            <sourceFileInclude>io/reactiverse/**/*.java</sourceFileInclude>
          </sourceFileIncludes>
          <sourceFileExcludes>
            <sourceFileExclude>**/package-info.java</sourceFileExclude>
            <sourceFileExclude>**/impl/**</sourceFileExclude>
          </sourceFileExcludes>
          <detectLinks />
          <detectJavaApiLink />
          <links>
            <link>http://vertx.io/docs/apidocs/</link>
          </links>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <!-- Site gen -->
    <profile>
      <id>site-gen</id>
      <activation>
        <property>
          <name>!skipSite</name>
        </property>
      </activation>
      <pluginRepositories>
        <pluginRepository>
          <id>rubygems-releases</id>
          <url>http://rubygems-proxy.torquebox.org/releases</url>
        </pluginRepository>
      </pluginRepositories>
      <repositories>
        <repository>
          <id>rubygems-releases</id>
          <url>http://rubygems-proxy.torquebox.org/releases</url>
        </repository>
      </repositories>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-site-plugin</artifactId>
            <version>3.4</version>
            <configuration>
              <skip>true</skip>
              <skipDeploy>true</skipDeploy>
            </configuration>
          </plugin>
          <plugin>
            <artifactId>maven-javadoc-plugin</artifactId>
            <executions>
              <execution>
                <phase>site</phase>
                <configuration>
                  <skip>false</skip>
                  <reportOutputDirectory>${project.basedir}/docs</reportOutputDirectory>
                </configuration>
                <goals>
                  <goal>javadoc</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
