<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2017 Agilx, 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.
-->
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <groupId>ai.apptuit.metrics</groupId>
  <artifactId>metrics-apptuit</artifactId>
  <version>0.9.7</version>
  <packaging>pom</packaging>
  <name>metrics-apptuit</name>
  <description>Dropwizard/codahale metrics reporter for sending metrics to Apptuit.AI</description>
  <url>https://github.com/ApptuitAI/metrics-apptuit/</url>
  <inceptionYear>2017</inceptionYear>
  <licenses>
    <license>
      <name>Apache 2.0</name>
      <url>https://github.com/ApptuitAI/metrics-apptuit/blob/master/LICENSE</url>
    </license>
  </licenses>
  <developers>
    <developer>
      <name>JInsight Developers</name>
      <email>hello+jinsight@apptuit.ai</email>
      <organization>apptuit.ai</organization>
      <organizationUrl>https://apptuit.ai</organizationUrl>
    </developer>
  </developers>
  <modules>
    <module>send-client</module>
    <module>dropwizard</module>
    <module>prometheus-client</module>
  </modules>
  <scm>
    <connection>scm:git:git://github.com/ApptuitAI/metrics-apptuit.git</connection>
    <developerConnection>scm:git:git@github.com:ApptuitAI/metrics-apptuit.git</developerConnection>
    <url>https://github.com/ApptuitAI/metrics-apptuit</url>
  </scm>
  <issueManagement>
    <system>GitHub Issues</system>
    <url>https://github.com/ApptuitAI/metrics-apptuit/issues</url>
  </issueManagement>
  <distributionManagement>
    <repository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
  </distributionManagement>
  <properties>
    <jvm.debug.options></jvm.debug.options>
    <enforce.findbugs>true</enforce.findbugs>
    <maven.version>3.5</maven.version>
    <ignore.license.checks>false</ignore.license.checks>
    <enforce.code.style>false</enforce.code.style>
    <minimum.instruction.coverage>0.80</minimum.instruction.coverage>
    <jacoco.includes>ai/apptuit/**/*</jacoco.includes>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <revision>0.9.7</revision>
    <maven.compiler.source>1.8</maven.compiler.source>
    <minimum.complexity.coverage>0.50</minimum.complexity.coverage>
    <junit.version>4.13.1</junit.version>
    <built.jar.path>${project.build.directory}/${project.build.finalName}.jar</built.jar.path>
    <java.version>1.8</java.version>
    <dependency.locations.enabled>false</dependency.locations.enabled>
    <powermock.version>1.7.4</powermock.version>
    <jacoco.agent.opts>destfile=${jacoco.dest.path},includes=${jacoco.includes}</jacoco.agent.opts>
    <maven.compiler.target>1.8</maven.compiler.target>
    <skipTests>false</skipTests>
    <skip.signing>true</skip.signing>
    <jacoco.rt.jar.path>${project.build.directory}/jacoco-agent-rt.jar</jacoco.rt.jar.path>
    <surefire.version>3.0.0-M4</surefire.version>
    <jacoco.version>0.8.5</jacoco.version>
    <metrics.version>3.2.6</metrics.version>
    <jacoco.dest.path>${project.build.directory}/jacoco.exec</jacoco.dest.path>
  </properties>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>3.0.0-M3</version>
        <executions>
          <execution>
            <id>enforce-maven</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireMavenVersion>
                  <version>3.0.5</version>
                </requireMavenVersion>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>flatten-maven-plugin</artifactId>
        <version>1.1.0</version>
        <executions>
          <execution>
            <id>flatten</id>
            <phase>process-resources</phase>
            <goals>
              <goal>flatten</goal>
            </goals>
          </execution>
          <execution>
            <id>flatten.clean</id>
            <phase>clean</phase>
            <goals>
              <goal>clean</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <updatePomFile>true</updatePomFile>
          <flattenMode>resolveCiFriendliesOnly</flattenMode>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>${jacoco.version}</version>
        <executions>
          <execution>
            <id>default-prepare-agent</id>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
          <execution>
            <id>default-report</id>
            <goals>
              <goal>report</goal>
            </goals>
          </execution>
          <execution>
            <id>default-check</id>
            <goals>
              <goal>check</goal>
            </goals>
            <configuration>
              <rules>
                <rule>
                  <element>BUNDLE</element>
                  <limits>
                    <limit>
                      <counter>COMPLEXITY</counter>
                      <value>COVEREDRATIO</value>
                      <minimum>${minimum.complexity.coverage}</minimum>
                    </limit>
                    <limit>
                      <counter>INSTRUCTION</counter>
                      <value>COVEREDRATIO</value>
                      <minimum>${minimum.instruction.coverage}</minimum>
                    </limit>
                  </limits>
                </rule>
              </rules>
              <skip>${skipTests}</skip>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>${surefire.version}</version>
        <dependencies>
          <dependency>
            <groupId>org.apache.maven.surefire</groupId>
            <artifactId>surefire-junit4</artifactId>
            <version>${surefire.version}</version>
          </dependency>
        </dependencies>
        <configuration>
          <argLine>${jvm.debug.options}</argLine>
          <systemPropertyVariables>
            <jacoco-agent.destfile>${jacoco.dest.path}</jacoco-agent.destfile>
          </systemPropertyVariables>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <version>3.1.1</version>
        <configuration>
          <archive>
            <manifestEntries>
              <Implementation-Title>${project.artifactId}</Implementation-Title>
              <Implementation-Version>${project.version}</Implementation-Version>
            </manifestEntries>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-source-plugin</artifactId>
        <version>3.0.1</version>
        <executions>
          <execution>
            <id>generate-sources-jar</id>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>3.1.1</version>
        <executions>
          <execution>
            <id>java-style-check</id>
            <phase>verify</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>com.puppycrawl.tools</groupId>
            <artifactId>checkstyle</artifactId>
            <version>8.32</version>
          </dependency>
        </dependencies>
        <configuration>
          <configLocation>google_checks.xml</configLocation>
          <encoding>UTF-8</encoding>
          <logViolationsToConsole>true</logViolationsToConsole>
          <failOnViolation>${enforce.code.style}</failOnViolation>
          <violationSeverity>warning</violationSeverity>
          <outputFile>${project.build.directory}/reports/checkstyle-results-java.xml</outputFile>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.rat</groupId>
        <artifactId>apache-rat-plugin</artifactId>
        <version>0.13</version>
        <executions>
          <execution>
            <phase>verify</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <excludes>
            <exclude>src/test/resources/META-INF/MANIFEST.MF</exclude>
            <exclude>src/test/resources/query-result-*.json</exclude>
            <exclude>conf/signingkey.*</exclude>
          </excludes>
          <ignoreErrors>${ignore.license.checks}</ignoreErrors>
          <reportStyle>xml</reportStyle>
          <reportFile>${project.build.directory}/reports/license-check-results.xml</reportFile>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>findbugs-maven-plugin</artifactId>
        <version>3.0.5</version>
        <executions>
          <execution>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <xmlOutput>true</xmlOutput>
          <effort>Max</effort>
          <failOnError>${enforce.findbugs}</failOnError>
          <includeTests>false</includeTests>
          <xmlOutputDirectory>${project.build.directory}/reports/</xmlOutputDirectory>
          <outputDirectory>${project.build.directory}/reports/</outputDirectory>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-gpg-plugin</artifactId>
        <version>1.5</version>
        <executions>
          <execution>
            <id>sign-artifacts</id>
            <phase>verify</phase>
            <goals>
              <goal>sign</goal>
            </goals>
            <configuration>
              <skip>${skip.signing}</skip>
              <gpgArguments>
                <arg>--pinentry-mode</arg>
                <arg>loopback</arg>
              </gpgArguments>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>nexus-staging-maven-plugin</artifactId>
        <version>1.6.8</version>
        <extensions>true</extensions>
        <configuration>
          <serverId>ossrh</serverId>
          <nexusUrl>https://oss.sonatype.org/</nexusUrl>
          <autoReleaseAfterClose>true</autoReleaseAfterClose>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-site-plugin</artifactId>
        <version>3.7.1</version>
      </plugin>
      <plugin>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>3.0.0</version>
      </plugin>
    </plugins>
  </build>
  <reporting>
    <plugins>
      <plugin>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>3.0.0</version>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>3.1.0</version>
        <reportSets>
          <reportSet>
            <reports>
              <report>javadoc</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
      <plugin>
        <artifactId>maven-jxr-plugin</artifactId>
        <version>3.0.0</version>
        <reportSets>
          <reportSet>
            <id>aggregate</id>
            <reports>
              <report>aggregate</report>
            </reports>
            <inherited>false</inherited>
          </reportSet>
        </reportSets>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>jdepend-maven-plugin</artifactId>
        <version>2.0</version>
      </plugin>
      <plugin>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>3.1.0</version>
        <reportSets>
          <reportSet>
            <reports>
              <report>checkstyle</report>
            </reports>
          </reportSet>
        </reportSets>
        <configuration>
          <configLocation>google_checks.xml</configLocation>
          <encoding>UTF-8</encoding>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.rat</groupId>
        <artifactId>apache-rat-plugin</artifactId>
        <version>0.12</version>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>findbugs-maven-plugin</artifactId>
        <version>3.0.5</version>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-report-plugin</artifactId>
        <version>${surefire.version}</version>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>${jacoco.version}</version>
        <reportSets>
          <reportSet>
            <reports>
              <report>report</report>
            </reports>
          </reportSet>
        </reportSets>
        <configuration>
          <includes>
            <include>${jacoco.includes}</include>
          </includes>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>taglist-maven-plugin</artifactId>
        <version>2.4</version>
        <configuration>
          <tagListOptions>
            <tagClasses>
              <tagClass>
                <displayName>Todo List</displayName>
                <tags>
                  <tag>
                    <matchString>todo</matchString>
                    <matchType>ignoreCase</matchType>
                  </tag>
                  <tag>
                    <matchString>FIXME</matchString>
                    <matchType>ignoreCase</matchType>
                  </tag>
                </tags>
              </tagClass>
            </tagClasses>
          </tagListOptions>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-pmd-plugin</artifactId>
        <version>3.11.0</version>
        <reportSets>
          <reportSet>
            <reports>
              <report>pmd</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
      <plugin>
        <groupId>com.github.spotbugs</groupId>
        <artifactId>spotbugs-maven-plugin</artifactId>
        <version>3.1.11</version>
        <configuration>
          <effort>Max</effort>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>versions-maven-plugin</artifactId>
        <version>2.7</version>
        <reportSets>
          <reportSet>
            <reports>
              <report>dependency-updates-report</report>
              <report>plugin-updates-report</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
    </plugins>
  </reporting>
</project>
