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

    Copyright 2016-2018 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>jdbi-opentracing</artifactId>
    <version>0.5.0</version>
    <packaging>pom</packaging>

    <modules>
        <module>opentracing-jdbi</module>
        <module>opentracing-jdbi3</module>
    </modules>

    <name>${project.groupId}:${project.artifactId}</name>
    <description>Root module for OpenTracing JDBI Instrumentation</description>
    <url>https://github.com/opentracing-contrib/java-jdbi</url>
    <inceptionYear>2016-2018</inceptionYear>

    <scm>
        <url>http://github.com/opentracing-contrib/java-jdbi</url>
        <connection>scm:git:https://github.com/opentracing-contrib/java-jdbi.git</connection>
        <developerConnection>scm:git:https://github.com/opentracing-contrib/java-jdbi.git</developerConnection>
        <tag>0.5.0</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>

    <organization>
        <name>OpenTracing</name>
        <url>http://opentracing.io/</url>
    </organization>

    <developers>
        <developer>
            <id>bensigelman</id>
            <name>Ben Sigelman</name>
            <email>bhs@lightstep.com</email>
        </developer>
        <developer>
            <id>joeblubaugh_lightstep</id>
            <name>Joe Blubaugh</name>
            <email>joe@lightstep.com</email>
        </developer>
        <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-jdbi/issues</url>
    </issueManagement>

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

        <opentracing.version>0.31.0</opentracing.version>
        <coveralls-maven-plugin.version>4.3.0</coveralls-maven-plugin.version>
        <jacoco-maven-plugin.version>0.8.2</jacoco-maven-plugin.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>io.opentracing</groupId>
            <artifactId>opentracing-api</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>

        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
            <version>1.4.196</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.0</version>
            </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-jdbi</packageName>
                </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>Makefile</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-jdbi/;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.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>3.0.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>
