<?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.0.1-incubating</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>htrace-htraced</artifactId>
  <name>htrace-htraced</name>
  <description>HTraced and HTraced clients</description>
  <url>http://incubator.apache.org/projects/htrace.html</url>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <configuration>
          <skipAssembly>true</skipAssembly>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-source-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-gpg-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.rat</groupId>
        <artifactId>apache-rat-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-deploy-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <configuration>
          <descriptorRefs>
            <descriptorRef>jar-with-dependencies</descriptorRef>
          </descriptorRefs>
        </configuration>
      </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.commons.logging</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>com.fasterxml.jackson</pattern>
                  <shadedPattern>org.apache.htrace.fasterxml.jackson</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.eclipse.jetty</pattern>
                  <shadedPattern>org.apache.htrace.jetty</shadedPattern>
                </relocation>
              </relocations>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <id>go_compile</id>
            <phase>compile</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <tasks>
                <exec>
                  <env />
                  <env />
                </exec>
              </tasks>
            </configuration>
          </execution>
          <execution>
            <id>go_test</id>
            <phase>test</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <tasks>
                <exec>
                  <arg />
                  <arg />
                  <env />
                </exec>
              </tasks>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-clean-plugin</artifactId>
        <version>2.6.1</version>
        <configuration>
          <filesets>
            <fileset>
              <directory>bin</directory>
            </fileset>
            <fileset>
              <directory>go/build</directory>
            </fileset>
            <fileset>
              <directory>go/pkg</directory>
            </fileset>
          </filesets>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>rpm-maven-plugin</artifactId>
        <version>2.1.1</version>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>rpm</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>rpm-maven-plugin</artifactId>
            <version>2.1.1</version>
            <extensions>true</extensions>
            <executions>
              <execution>
                <id>generate-rpm</id>
                <phase>package</phase>
                <goals>
                  <goal>rpm</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <group>Application</group>
              <needarch>true</needarch>
              <release>4.0.0</release>
              <defaultDirmode>755</defaultDirmode>
              <defaultFilemode>644</defaultFilemode>
              <defaultUsername>root</defaultUsername>
              <mappings>
                <mapping>
                  <directory>/usr/local/htraced/web</directory>
                  <sources>
                    <source>
                      <location>src/web</location>
                    </source>
                  </sources>
                </mapping>
                <mapping>
                  <directory>/usr/local/htraced/bin</directory>
                  <filemode>755</filemode>
                  <sources>
                    <source>
                      <location>go/build/htrace</location>
                    </source>
                    <source>
                      <location>go/build/htraced</location>
                    </source>
                  </sources>
                </mapping>
                <mapping>
                  <directory>/usr/local/htraced/java</directory>
                  <sources>
                    <source>
                      <location>target/htrace-htraced-4.0.0-incubating-SNAPSHOT.jar</location>
                    </source>
                  </sources>
                </mapping>
              </mappings>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
  <dependencies>
    <dependency>
      <groupId>org.apache.htrace</groupId>
      <artifactId>htrace-core4</artifactId>
      <version>4.0.1-incubating</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.htrace</groupId>
      <artifactId>htrace-core4</artifactId>
      <version>4.0.1-incubating</version>
      <classifier>tests</classifier>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.htrace</groupId>
      <artifactId>htrace-webapp</artifactId>
      <version>4.0.1-incubating</version>
      <type>war</type>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>commons-logging</groupId>
      <artifactId>commons-logging</artifactId>
      <version>1.1.1</version>
      <scope>provided</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>
  </dependencies>
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>
</project>

