<?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">
  <parent>
    <artifactId>htrace</artifactId>
    <groupId>org.apache.htrace</groupId>
    <version>4.1.0-incubating</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>htrace-hbase</artifactId>
  <name>htrace-hbase</name>
  <description>htrace-hbase is the tools to send tracing information
    to an HBase database for analysis later.</description>
  <url>http://incubator.apache.org/projects/htrace.html</url>
  <build>
    <resources>
      <resource>
        <directory>${basedir}/src/main</directory>
        <includes>
          <include>webapps/**</include>
        </includes>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <configuration>
          <descriptorRefs>
            <descriptorRef>jar-with-dependencies</descriptorRef>
          </descriptorRefs>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.rat</groupId>
        <artifactId>apache-rat-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-source-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <relocations>
                <relocation>
                  <pattern>org.apache.commons.logging</pattern>
                  <shadedPattern>org.apache.htrace.shaded.commons.logging</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>com.google.protobuf</pattern>
                  <shadedPattern>org.apache.htrace.shaded.com.google.protobuf</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.eclipse.jetty</pattern>
                  <shadedPattern>org.apache.htrace.shaded.org.eclipse.jetty</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>javax.servlet</pattern>
                  <shadedPattern>org.apache.htrace.shaded.javax.servlet</shadedPattern>
                </relocation>
              </relocations>
            </configuration>
          </execution>
        </executions>
        <configuration>
          <createDependencyReducedPom>${createDependencyReducedPom}</createDependencyReducedPom>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-gpg-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-deploy-plugin</artifactId>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>compile-protobuf</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.hadoop</groupId>
            <artifactId>hadoop-maven-plugins</artifactId>
            <version>2.7.1</version>
            <executions>
              <execution>
                <id>compile-protoc</id>
                <phase>generate-sources</phase>
                <goals>
                  <goal>protoc</goal>
                </goals>
                <configuration>
                  <imports>
                    <param>${basedir}/src/main/protobuf</param>
                  </imports>
                  <source>
                    <directory>${basedir}/src/main/protobuf</directory>
                    <includes>
                      <include>Span.proto</include>
                    </includes>
                  </source>
                  <output>${basedir}/src/main/java/</output>
                </configuration>
              </execution>
            </executions>
            <configuration>
              <protocVersion>${protobuf.version}</protocVersion>
              <protocCommand>${protoc.path}</protocCommand>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>dist</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-assembly-plugin</artifactId>
            <configuration>
              <skipAssembly>true</skipAssembly>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
  <dependencies>
    <dependency>
      <groupId>org.apache.htrace</groupId>
      <artifactId>htrace-core4</artifactId>
      <version>4.1.0-incubating</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.htrace</groupId>
      <artifactId>htrace-core4</artifactId>
      <version>4.1.0-incubating</version>
      <classifier>tests</classifier>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.11</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>hamcrest-core</artifactId>
          <groupId>org.hamcrest</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.hbase</groupId>
      <artifactId>hbase-common</artifactId>
      <version>1.1.2</version>
      <scope>provided</scope>
      <exclusions>
        <exclusion>
          <artifactId>hbase-protocol</artifactId>
          <groupId>org.apache.hbase</groupId>
        </exclusion>
        <exclusion>
          <artifactId>hbase-annotations</artifactId>
          <groupId>org.apache.hbase</groupId>
        </exclusion>
        <exclusion>
          <artifactId>guava</artifactId>
          <groupId>com.google.guava</groupId>
        </exclusion>
        <exclusion>
          <artifactId>commons-codec</artifactId>
          <groupId>commons-codec</groupId>
        </exclusion>
        <exclusion>
          <artifactId>commons-lang</artifactId>
          <groupId>commons-lang</groupId>
        </exclusion>
        <exclusion>
          <artifactId>commons-collections</artifactId>
          <groupId>commons-collections</groupId>
        </exclusion>
        <exclusion>
          <artifactId>commons-io</artifactId>
          <groupId>commons-io</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jetty-util</artifactId>
          <groupId>org.mortbay.jetty</groupId>
        </exclusion>
        <exclusion>
          <artifactId>htrace-core</artifactId>
          <groupId>org.apache.htrace</groupId>
        </exclusion>
        <exclusion>
          <artifactId>hadoop-common</artifactId>
          <groupId>org.apache.hadoop</groupId>
        </exclusion>
        <exclusion>
          <artifactId>hadoop-mapreduce-client-core</artifactId>
          <groupId>org.apache.hadoop</groupId>
        </exclusion>
        <exclusion>
          <artifactId>findbugs-annotations</artifactId>
          <groupId>com.github.stephenc.findbugs</groupId>
        </exclusion>
        <exclusion>
          <artifactId>log4j</artifactId>
          <groupId>log4j</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.hbase</groupId>
      <artifactId>hbase-client</artifactId>
      <version>1.1.2</version>
      <scope>provided</scope>
      <exclusions>
        <exclusion>
          <artifactId>htrace-core4</artifactId>
          <groupId>org.apache.htrace</groupId>
        </exclusion>
        <exclusion>
          <artifactId>netty-all</artifactId>
          <groupId>io.netty</groupId>
        </exclusion>
        <exclusion>
          <artifactId>zookeeper</artifactId>
          <groupId>org.apache.zookeeper</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jackson-mapper-asl</artifactId>
          <groupId>org.codehaus.jackson</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jcodings</artifactId>
          <groupId>org.jruby.jcodings</groupId>
        </exclusion>
        <exclusion>
          <artifactId>joni</artifactId>
          <groupId>org.jruby.joni</groupId>
        </exclusion>
        <exclusion>
          <artifactId>hadoop-auth</artifactId>
          <groupId>org.apache.hadoop</groupId>
        </exclusion>
        <exclusion>
          <artifactId>hbase-annotations</artifactId>
          <groupId>org.apache.hbase</groupId>
        </exclusion>
        <exclusion>
          <artifactId>hbase-protocol</artifactId>
          <groupId>org.apache.hbase</groupId>
        </exclusion>
        <exclusion>
          <artifactId>commons-codec</artifactId>
          <groupId>commons-codec</groupId>
        </exclusion>
        <exclusion>
          <artifactId>commons-io</artifactId>
          <groupId>commons-io</groupId>
        </exclusion>
        <exclusion>
          <artifactId>commons-lang</artifactId>
          <groupId>commons-lang</groupId>
        </exclusion>
        <exclusion>
          <artifactId>guava</artifactId>
          <groupId>com.google.guava</groupId>
        </exclusion>
        <exclusion>
          <artifactId>htrace-core</artifactId>
          <groupId>org.apache.htrace</groupId>
        </exclusion>
        <exclusion>
          <artifactId>hadoop-common</artifactId>
          <groupId>org.apache.hadoop</groupId>
        </exclusion>
        <exclusion>
          <artifactId>hadoop-mapreduce-client-core</artifactId>
          <groupId>org.apache.hadoop</groupId>
        </exclusion>
        <exclusion>
          <artifactId>findbugs-annotations</artifactId>
          <groupId>com.github.stephenc.findbugs</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.hbase</groupId>
      <artifactId>hbase-testing-util</artifactId>
      <version>1.1.2</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>hbase-common</artifactId>
          <groupId>org.apache.hbase</groupId>
        </exclusion>
        <exclusion>
          <artifactId>hbase-annotations</artifactId>
          <groupId>org.apache.hbase</groupId>
        </exclusion>
        <exclusion>
          <artifactId>hbase-server</artifactId>
          <groupId>org.apache.hbase</groupId>
        </exclusion>
        <exclusion>
          <artifactId>hbase-server</artifactId>
          <groupId>org.apache.hbase</groupId>
        </exclusion>
        <exclusion>
          <artifactId>hbase-hadoop-compat</artifactId>
          <groupId>org.apache.hbase</groupId>
        </exclusion>
        <exclusion>
          <artifactId>hbase-hadoop-compat</artifactId>
          <groupId>org.apache.hbase</groupId>
        </exclusion>
        <exclusion>
          <artifactId>hbase-hadoop2-compat</artifactId>
          <groupId>org.apache.hbase</groupId>
        </exclusion>
        <exclusion>
          <artifactId>hbase-hadoop2-compat</artifactId>
          <groupId>org.apache.hbase</groupId>
        </exclusion>
        <exclusion>
          <artifactId>slf4j-log4j12</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
        <exclusion>
          <artifactId>hadoop-client</artifactId>
          <groupId>org.apache.hadoop</groupId>
        </exclusion>
        <exclusion>
          <artifactId>hadoop-mapreduce-client-jobclient</artifactId>
          <groupId>org.apache.hadoop</groupId>
        </exclusion>
        <exclusion>
          <artifactId>hadoop-hdfs</artifactId>
          <groupId>org.apache.hadoop</groupId>
        </exclusion>
        <exclusion>
          <artifactId>hadoop-hdfs</artifactId>
          <groupId>org.apache.hadoop</groupId>
        </exclusion>
        <exclusion>
          <artifactId>hadoop-minicluster</artifactId>
          <groupId>org.apache.hadoop</groupId>
        </exclusion>
        <exclusion>
          <artifactId>hadoop-auth</artifactId>
          <groupId>org.apache.hadoop</groupId>
        </exclusion>
        <exclusion>
          <artifactId>log4j</artifactId>
          <groupId>log4j</groupId>
        </exclusion>
        <exclusion>
          <artifactId>hbase-protocol</artifactId>
          <groupId>org.apache.hbase</groupId>
        </exclusion>
        <exclusion>
          <artifactId>hadoop-common</artifactId>
          <groupId>org.apache.hadoop</groupId>
        </exclusion>
        <exclusion>
          <artifactId>hadoop-mapreduce-client-core</artifactId>
          <groupId>org.apache.hadoop</groupId>
        </exclusion>
        <exclusion>
          <artifactId>findbugs-annotations</artifactId>
          <groupId>com.github.stephenc.findbugs</groupId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>
  <properties>
    <jetty.version>9.2.13.v20150730</jetty.version>
    <hbase.version>1.1.2</hbase.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <createDependencyReducedPom>true</createDependencyReducedPom>
  </properties>
</project>

