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

    <parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>7</version>
    </parent>

    <groupId>com.expedia.www</groupId>
    <artifactId>haystack-logback-metrics-appender</artifactId>
    <version>1.0.6</version>
    <packaging>jar</packaging>

    <scm>
        <connection>scm:git:git://github.com/ExpediaDotCom/haystack-logback-metrics-appender.git</connection>
        <developerConnection>scm:git:ssh://github.com/ExpediaDotCom/haystack-logback-metrics-appender.git</developerConnection>
        <url>http://github.com/ExpediaDotCom/haystack-logback-metrics-appender</url>
    </scm>

    <name>${project.groupId}:${project.artifactId}</name>
    <description>A logback appender that sends an error count to a graphite endpoint</description>
    <url>https://github.com/ExpediaDotCom/haystack/tree/master/commons</url>

    <licenses>
        <!--
           /*
            *
            *  Copyright 2017 Expedia, Inc.
            *
            *     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.
            *
            */
          -->
        <license>
            <name>Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

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

        <coveralls-maven-plugin-version>4.3.0</coveralls-maven-plugin-version>
        <haystack-metrics-version>2.0.1</haystack-metrics-version>
        <java.version>1.8</java.version>
        <jacoco-maven-plugin-version>0.7.9</jacoco-maven-plugin-version>
        <jacoco-percentage>1.0</jacoco-percentage>
        <junit-version>4.12</junit-version>
        <logback-version>1.2.3</logback-version>
        <maven-compiler-plugin-version>3.6.1</maven-compiler-plugin-version>
        <maven-gpg-plugin-version>1.6</maven-gpg-plugin-version>
        <maven-javadoc-plugin-version>2.10.4</maven-javadoc-plugin-version>
        <maven-jar-plugin-version>3.0.2</maven-jar-plugin-version>
        <maven-source-plugin-version>3.0.1</maven-source-plugin-version>
        <mockito-version>1.9.5</mockito-version>
        <nexus-staging-maven-plugin.version>1.6.8</nexus-staging-maven-plugin.version>
        <servo-version>0.12.17</servo-version>
    </properties>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>
 
    <developers>
        <developer>
            <name>Jeff Baker</name>
            <email>jeffbaker@expedia.com</email>
            <organization>Haystack</organization>
            <organizationUrl>https://expediadotcom.github.io/haystack/infrastructure/section.html</organizationUrl>
        </developer>
    </developers>

    <dependencies>
        <dependency>
            <groupId>com.expedia.www</groupId>
            <artifactId>haystack-metrics</artifactId>
            <version>${haystack-metrics-version}</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/com.netflix.servo/servo-core -->
        <dependency>
            <groupId>com.netflix.servo</groupId>
            <artifactId>servo-core</artifactId>
            <version>${servo-version}</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/com.netflix.servo/servo-graphite -->
        <dependency>
            <groupId>com.netflix.servo</groupId>
            <artifactId>servo-graphite</artifactId>
            <version>${servo-version}</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/ch.qos.logback/logback-core -->
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-core</artifactId>
            <version>${logback-version}</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/ch.qos.logback/logback-classic -->
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>${logback-version}</version>
        </dependency>

        <!-- Test dependencies -->
        <!-- https://mvnrepository.com/artifact/junit/junit -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit-version}</version>
            <scope>test</scope>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.mockito/mockito-all -->
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <version>${mockito-version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>${jacoco-maven-plugin-version}</version>
                <executions>
                    <execution>
                        <id>jacoco-initialize</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>jacoco-report</id>
                        <phase>test</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>jacoco-check</id>
                        <phase>test</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <rule>
                                    <element>BUNDLE</element>
                                    <limits>
                                        <limit>
                                            <counter>INSTRUCTION</counter>
                                            <value>COVEREDRATIO</value>
                                            <minimum>${jacoco-percentage}</minimum>
                                        </limit>
                                        <limit>
                                            <counter>BRANCH</counter>
                                            <value>COVEREDRATIO</value>
                                            <minimum>${jacoco-percentage}</minimum>
                                        </limit>
                                    </limits>
                                </rule>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven-compiler-plugin-version}</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>${maven-gpg-plugin-version}</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <!-- Build a JavaDoc JAR -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${maven-javadoc-plugin-version}</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <!-- Build an executable JAR -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>${maven-jar-plugin-version}</version>
            </plugin>
            <plugin>
                <!-- Build a source JAR -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>${maven-source-plugin-version}</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>${nexus-staging-maven-plugin.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>ossrh</serverId>
                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.eluder.coveralls</groupId>
                <artifactId>coveralls-maven-plugin</artifactId>
                <version>${coveralls-maven-plugin-version}</version>
                <configuration>
                    <repoToken>v2wMR7aEbFYzvPYt9yjkRnMBwRvSOxbQV</repoToken>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
