<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright 2017-2019 The OpenTracing Authors

    Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
    in compliance with the License. You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software distributed under the License
    is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
    or implied. See the License for the specific language governing permissions and limitations under
    the License.

-->
<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-redis-parent</artifactId>
  <packaging>pom</packaging>
  <version>0.1.14</version>

  <modules>
    <module>opentracing-redis-lettuce-5.0</module>
    <module>opentracing-redis-lettuce-5.1</module>
    <module>opentracing-redis-lettuce-5.2</module>
    <module>opentracing-redis-jedis</module>
    <module>opentracing-redis-jedis3</module>
    <module>opentracing-redis-common</module>
    <module>opentracing-redis-redisson</module>
    <module>opentracing-redis-spring-data</module>
    <module>opentracing-redis-spring-data2</module>
  </modules>

  <name>OpenTracing Instrumentation for Apache Redis Client</name>
  <description>OpenTracing Instrumentation for Apache Redis Client</description>
  <url>https://github.com/opentracing-contrib/java-redis-client</url>
  <inceptionYear>2017-2019</inceptionYear>

  <scm>
    <url>http://github.com/opentracing-contrib/java-redis-client</url>
    <connection>scm:git:https://github.com/opentracing-contrib/java-redis-client.git</connection>
    <developerConnection>scm:git:https://github.com/opentracing-contrib/java-redis-client.git
    </developerConnection>
    <tag>0.1.14</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-redis-client/issues</url>
  </issueManagement>

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

    <opentracing.version>0.33.0</opentracing.version>
    <coveralls-maven-plugin.version>4.3.0</coveralls-maven-plugin.version>
    <jacoco-maven-plugin.version>0.8.4</jacoco-maven-plugin.version>
  </properties>

  <dependencyManagement>
    <dependencies>

      <dependency>
        <groupId>org.awaitility</groupId>
        <artifactId>awaitility</artifactId>
        <version>3.1.6</version>
        <scope>test</scope>
      </dependency>

      <dependency>
        <groupId>com.github.kstyrc</groupId>
        <artifactId>embedded-redis</artifactId>
        <version>0.6</version>
        <scope>test</scope>
      </dependency>

      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-core</artifactId>
        <version>2.27.0</version>
        <scope>test</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
    <dependency>
      <groupId>io.opentracing</groupId>
      <artifactId>opentracing-noop</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>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.12</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.8.1</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>com.mycila</groupId>
        <artifactId>license-maven-plugin</artifactId>
        <version>3.0</version>
        <configuration>
          <mapping>
            <java>SLASHSTAR_STYLE</java>
          </mapping>
          <header>header.txt</header>
          <strictCheck>true</strictCheck>
          <excludes>
            <exclude>LICENSE</exclude>
            <exclude>mvnw</exclude>
            <exclude>mvnw.cmd</exclude>
            <exclude>.mvn/wrapper/maven-wrapper.properties</exclude>
            <exclude>.coveralls.yml</exclude>
          </excludes>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>check</goal>
            </goals>
            <phase>compile</phase>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.eluder.coveralls</groupId>
        <artifactId>coveralls-maven-plugin</artifactId>
        <version>${coveralls-maven-plugin.version}</version>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>${jacoco-maven-plugin.version}</version>
        <executions>
          <execution>
            <id>prepare-agent</id>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

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

  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <!-- Creates source jar -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>3.1.0</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>3.1.1</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>
