<?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/maven-v4_0_0.xsd">

  <modelVersion>4.0.0</modelVersion>

  <artifactId>stitch-library</artifactId>
  <version>0.4.0</version>
  <packaging>jar</packaging>
  <name>${project.groupId}:${project.artifactId}</name>
  <description>Stitch is a Java library that helps implement HTTP Patch</description>
  <url>http://github.com/aol/stitch</url>

  <licenses>
    <license>
      <name>AOL flavor of BSD 3-Clause License</name>
      <url>https://opensource.org/licenses/BSD-3-Clause</url>
    </license>
  </licenses>

  <developers>
    <developer>
      <name>Madhu Ramanna</name>
      <email>madhu.ramanna@advertising.com</email>
    </developer>
  </developers>

  <parent>
    <groupId>com.aol.one</groupId>
    <artifactId>stitch-parent</artifactId>
    <version>0.4.0</version>
    <relativePath>..</relativePath>
  </parent>

  <build>

    <resources>
      <resource>
        <directory>${project.basedir}</directory>
        <targetPath>META-INF</targetPath>
        <includes>
          <include>LICENSE.TXT</include>
        </includes>
      </resource>
    </resources>

    <plugins>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>0.7.5.201505241946</version>
        <configuration>
          <destFile>${basedir}/target/coverage-reports/jacoco-unit.exec</destFile>
          <dataFile>${basedir}/target/coverage-reports/jacoco-unit.exec</dataFile>
        </configuration>
        <executions>
          <execution>
            <id>jacoco-initialize</id>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
          <execution>
            <id>jacoco-site</id>
            <phase>package</phase>
            <goals>
              <goal>report</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>${maven.compiler.version}</version>
        <executions>
          <execution>
            <id>default-compile</id>
            <configuration>
              <showDeprecation>true</showDeprecation>
              <showWarnings>true</showWarnings>
              <compilerArguments>
                <source>${maven.compiler.target}</source>
                <target>${maven.compiler.source}</target>
              </compilerArguments>
            </configuration>
          </execution>
          <execution>
            <id>default-testCompile</id>
            <configuration>
              <showDeprecation>true</showDeprecation>
              <showWarnings>true</showWarnings>
              <compilerArguments>
                <source>${maven.compiler.testTarget}</source>
                <target>${maven.compiler.testSource}</target>
              </compilerArguments>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.sonarsource.scanner.maven</groupId>
        <artifactId>sonar-maven-plugin</artifactId>
        <version>3.0.1</version>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>cobertura-maven-plugin</artifactId>
        <version>2.7</version>
        <configuration>
          <check>
            <branchRate>85</branchRate>
            <lineRate>85</lineRate>
            <haltOnFailure>true</haltOnFailure>
            <totalBranchRate>85</totalBranchRate>
            <totalLineRate>85</totalLineRate>
            <packageLineRate>85</packageLineRate>
            <packageBranchRate>85</packageBranchRate>
            <regexes>
              <regex>
                <pattern>com.aol.one.patch.*</pattern>
                <branchRate>90</branchRate>
                <lineRate>80</lineRate>
              </regex>
            </regexes>
          </check>
          <instrumentation>
            <excludes>
              <exclude>com/aol/**/*Test.class</exclude>
              <exclude>com/aol/**/*Exception.class</exclude>
            </excludes>
          </instrumentation>
          <formats>
            <format>xml</format>
          </formats>
        </configuration>
      </plugin>
    </plugins>
  </build>

</project>
