<?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>io.opentracing.contrib</groupId>
  <artifactId>opentracing-rxjava-parent</artifactId>
  <version>0.0.4</version>
  <packaging>pom</packaging>

  <name>${project.groupId}:${project.artifactId}</name>
  <description>OpenTracing Instrumentation for RxJava</description>
  <url>https://github.com/opentracing-contrib/java-rxjava</url>

  <scm>
    <url>http://github.com/opentracing-contrib/java-rxjava</url>
    <connection>scm:git:https://github.com/opentracing-contrib/java-rxjava.git</connection>
    <developerConnection>scm:git:https://github.com/opentracing-contrib/java-rxjava.git
    </developerConnection>
    <tag>0.0.4</tag>
  </scm>

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

  <developers>
    <developer>
      <id>malafeev</id>
      <name>Sergei Malafeev</name>
      <email>sergeymalafeev@gmail.com</email>
    </developer>
  </developers>

  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/opentracing-contrib/java-rxjava/issues</url>
  </issueManagement>

  <properties>
    <java.version>1.7</java.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.build.resourceEncoding>UTF-8</project.build.resourceEncoding>

    <opentracing.version>0.30.0</opentracing.version>
  </properties>

  <modules>
    <module>opentracing-rxjava-1</module>
    <module>opentracing-rxjava-2</module>
  </modules>

  <dependencies>
    <dependency>
      <groupId>io.opentracing</groupId>
      <artifactId>opentracing-util</artifactId>
      <version>${opentracing.version}</version>
    </dependency>

    <dependency>
      <groupId>io.opentracing</groupId>
      <artifactId>opentracing-mock</artifactId>
      <version>${opentracing.version}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>com.jayway.awaitility</groupId>
      <artifactId>awaitility</artifactId>
      <version>1.7.0</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.12</version>
      <scope>test</scope>
    </dependency>

  </dependencies>

  <distributionManagement>
    <repository>
      <id>bintray</id>
      <url>https://api.bintray.com/maven/opentracing/maven/opentracing-rxjava/;publish=1</url>
    </repository>
    <snapshotRepository>
      <id>jfrog-snapshots</id>
      <url>http://oss.jfrog.org/artifactory/oss-snapshot-local</url>
    </snapshotRepository>
  </distributionManagement>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.6.2</version>
        <configuration>
          <source>${java.version}</source>
          <target>${java.version}</target>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.5.3</version>
        <configuration>
          <useReleaseProfile>false</useReleaseProfile>
          <releaseProfiles>release</releaseProfiles>
          <autoVersionSubmodules>true</autoVersionSubmodules>
          <tagNameFormat>@{project.version}</tagNameFormat>
        </configuration>
      </plugin>
      <plugin>
        <groupId>io.zipkin.centralsync-maven-plugin</groupId>
        <artifactId>centralsync-maven-plugin</artifactId>
        <version>0.1.0</version>
        <configuration>
          <subject>opentracing</subject>
          <repo>maven</repo>
          <packageName>opentracing-rxjava</packageName>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <!-- Creates source jar -->
          <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>
          <!-- Creates javadoc jar -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>2.10.4</version>
            <configuration>
              <failOnError>false</failOnError>
            </configuration>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
                <phase>package</phase>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>