<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>9</version>
  </parent>

  <groupId>com.hotels</groupId>
  <artifactId>plunger</artifactId>
  <version>1.0.2</version>
  <name>Plunger</name>
  <description>Framework to simplify testing Cascading applications</description>
  <url>https://github.com/HotelsDotCom/plunger</url>

  <properties>
    <cascading.version>2.6.1</cascading.version>
    <hadoop.version>2.4.0.2.1.3.0-563</hadoop.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <jdk.version>1.7</jdk.version>
    <maven.compiler.plugin.version>3.0</maven.compiler.plugin.version>
    <maven.jar.plugin.version>2.3.2</maven.jar.plugin.version>
    <maven.release.plugin.version>2.3.2</maven.release.plugin.version>
    <maven.dependency.plugin.version>2.8</maven.dependency.plugin.version>
    <cobertura.version>2.0.3</cobertura.version>
    <cobertura.maven.plugin.version>2.6</cobertura.maven.plugin.version>
    <maven.site.plugin.version>3.0</maven.site.plugin.version>
    <maven.project.info.reports.plugin.version>2.4</maven.project.info.reports.plugin.version>
    <maven.jxr.plugin.version>2.3</maven.jxr.plugin.version>
    <maven.pmd.plugin.version>2.7.1</maven.pmd.plugin.version>
    <findbugs.maven.plugin.version>2.5.3</findbugs.maven.plugin.version>
    <maven.javadoc.plugin.version>2.9.1</maven.javadoc.plugin.version>
    <maven.checkstyle.plugin.version>2.10</maven.checkstyle.plugin.version>
    <failsafe-maven-plugin.version>2.4.3-alpha-1</failsafe-maven-plugin.version>
  </properties>

  <scm>
    <connection>scm:git:git@github.com:HotelsDotCom/${project.artifactId}.git</connection>
    <developerConnection>scm:git:git@github.com:HotelsDotCom/${project.artifactId}.git</developerConnection>
    <url>https://github.com/HotelsDotCom/plunger</url>
    <tag>HEAD</tag>
  </scm>

  <organization>
    <name>Hotels.com (Data Platform Team)</name>
    <url>http://hotels.com</url>
  </organization>

  <developers>
    <developer>
      <name>Elliot West</name>
      <id>teabot</id>
      <email>teabot@gmail.com</email>
      <timezone>0</timezone>
      <organization>Hotels.com</organization>
      <organizationUrl>http://hotels.com</organizationUrl>
    </developer>
    <developer>
      <name>Dave Maughan</name>
      <timezone>0</timezone>
      <organization>Hotels.com</organization>
      <organizationUrl>http://hotels.com</organizationUrl>
    </developer>
  </developers>

  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0</url>
    </license>
  </licenses>

  <dependencies>
    <!-- Cascading -->
    <dependency>
      <groupId>cascading</groupId>
      <artifactId>cascading-core</artifactId>
      <version>${cascading.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>cascading</groupId>
      <artifactId>cascading-local</artifactId>
      <version>${cascading.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>cascading</groupId>
      <artifactId>cascading-hadoop2-mr1</artifactId>
      <version>${cascading.version}</version>
      <scope>provided</scope>
    </dependency>

    <!-- Hadoop -->
    <dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-common</artifactId>
      <version>${hadoop.version}</version>
      <scope>provided</scope>
      <exclusions>
        <exclusion>
          <artifactId>mockito-all</artifactId>
          <groupId>org.mockito</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-mapreduce-client-core</artifactId>
      <version>${hadoop.version}</version>
      <type>jar</type>
      <scope>provided</scope>
    </dependency>

    <!-- Assertion matchers -->
    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest-core</artifactId>
      <version>1.3</version>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>1.9.5</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <version>2.4</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.11</version>
      <scope>provided</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>${maven.compiler.plugin.version}</version>
        <configuration>
          <source>${jdk.version}</source>
          <target>${jdk.version}</target>
          <encoding>${project.build.sourceEncoding}</encoding>
          <showWarnings>true</showWarnings>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>${maven.jar.plugin.version}</version>
        <configuration>
          <archive>
            <manifestEntries>
              <Build-Version>${project.version}</Build-Version>
              <Build-DateTime>${maven.build.timestamp}</Build-DateTime>
              <Maven-GroupId>${project.groupId}</Maven-GroupId>
              <Maven-ArtifactId>${project.artifactId}</Maven-ArtifactId>
            </manifestEntries>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>cobertura-maven-plugin</artifactId>
        <version>${cobertura.maven.plugin.version}</version>
        <configuration>
          <encoding>${project.build.sourceEncoding}</encoding>
          <aggregate>true</aggregate>
          <formats>
            <format>xml</format>
            <format>html</format>
          </formats>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>clean</goal>
              <goal>cobertura</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>findbugs-maven-plugin</artifactId>
        <version>${findbugs.maven.plugin.version}</version>
        <configuration>
          <encoding>${project.build.sourceEncoding}</encoding>
          <xmlOutput>true</xmlOutput>
          <effort>Max</effort>
          <threshold>Low</threshold>
          <excludeFilterFile>${findbugs.config}</excludeFilterFile>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>${maven.checkstyle.plugin.version}</version>
        <configuration>
          <configLocation>src/test/resources/com/hotels/maven/plugins/config/hwwCheckstyle.xml</configLocation>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>${maven.javadoc.plugin.version}</version>
        <configuration>
          <encoding>UTF-8</encoding>
        </configuration>
        <executions>
          <execution>
            <id>aggregate</id>
            <goals>
              <goal>aggregate</goal>
            </goals>
            <phase>site</phase>
          </execution>
        </executions>
      </plugin>
    </plugins>

    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>failsafe-maven-plugin</artifactId>
          <version>${failsafe-maven-plugin.version}</version>
          <executions>
            <execution>
              <id>integration-test</id>
              <goals>
                <goal>integration-test</goal>
              </goals>
            </execution>
            <execution>
              <id>verify</id>
              <goals>
                <goal>verify</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
        <version>${maven.site.plugin.version}</version>
        <configuration>
          <outputEncoding>UTF-8</outputEncoding>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>${maven.project.info.reports.plugin.version}</version>
        <reportSets>
          <reportSet>
            <reports>
              <report>index</report>
              <report>dependencies</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
      <!-- The JXR plugin produces a cross-reference of the project's sources. The generated reports make it easier for the user to reference 
        or find specific lines of code. It is also handy when used with the PMD plugin for referencing errors found in the code. -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jxr-plugin</artifactId>
        <version>${maven.jxr.plugin.version}</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-pmd-plugin</artifactId>
        <version>${maven.pmd.plugin.version}</version>
        <configuration>
          <sourceEncoding>${project.build.sourceEncoding}</sourceEncoding>
          <outputEncoding>${project.build.sourceEncoding}</outputEncoding>
          <targetJdk>${jdk.version}</targetJdk>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>${maven.javadoc.plugin.version}</version>
        <configuration>
          <encoding>${project.build.sourceEncoding}</encoding>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>cobertura-maven-plugin</artifactId>
        <version>${cobertura.maven.plugin.version}</version>
        <configuration>
          <encoding>${project.build.sourceEncoding}</encoding>
          <aggregate>true</aggregate>
          <formats>
            <format>html</format>
            <format>xml</format>
          </formats>
          <check />
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>findbugs-maven-plugin</artifactId>
        <version>${findbugs.maven.plugin.version}</version>
        <configuration>
          <excludeFilterFile>src/test/resources/com/hotels/maven/plugins/config/hwwFindbugsExclude.xml</excludeFilterFile>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>${maven.checkstyle.plugin.version}</version>
        <configuration>
          <configLocation>src/test/resources/com/hotels/maven/plugins/config/hwwCheckstyle.xml</configLocation>
        </configuration>
      </plugin>
    </plugins>
  </reporting>

  <profiles>
    <profile>
      <id>doclint-java8-disable</id>
      <activation>
        <jdk>[1.8,)</jdk>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <configuration>
              <additionalparam>-Xdoclint:none</additionalparam>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
