blob: b67af6d0edb8804185ae3678f9af2c3f72f391a9 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
license agreements. See the NOTICE file distributed with this work for additional
information regarding copyright ownership. The ASF licenses this file to
You 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 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>
<artifactId>htrace-htraced</artifactId>
<packaging>jar</packaging>
<parent>
<artifactId>htrace</artifactId>
<groupId>org.apache.htrace</groupId>
<version>4.1.0-incubating-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<name>htrace-htraced</name>
<description>HTraced and HTraced clients</description>
<url>http://incubator.apache.org/projects/htrace.html</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<git.version></git.version>
<leveldb.prefix></leveldb.prefix>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
</plugin>
<plugin>
<!-- explicitly define maven-deploy-plugin after other to force exec order -->
<artifactId>maven-deploy-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<!--Make it so assembly:single does nothing in here-->
<skipAssembly>true</skipAssembly>
</configuration>
</plugin>
<!--Move this to top-level. These shade patterns are common across components
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<configuration>
<relocations>
<relocation>
<pattern>org.apache.commons.logging</pattern>
<shadedPattern>org.apache.htrace.shaded.commons.logging</shadedPattern>
</relocation>
<relocation>
<pattern>com.fasterxml.jackson</pattern>
<shadedPattern>org.apache.htrace.shaded.fasterxml.jackson</shadedPattern>
</relocation>
<relocation>
<pattern>org.eclipse.jetty</pattern>
<shadedPattern>org.apache.htrace.shaded.jetty</shadedPattern>
</relocation>
<dependency>
<pattern>org.msgpack</pattern>
<shadedPattern>org.apache.htrace.msgpack</shadedPattern>
</dependency>
</relocations>
</configuration>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>compile</phase>
<id>go_compile</id>
<goals><goal>run</goal></goals>
<configuration>
<tasks>
<exec executable="./gobuild.sh"
dir="${basedir}//go/"
failonerror="true">
<env key="GIT_VERSION" value="${git.version}"/>
<env key="RELEASE_VERSION" value="${project.version}"/>
<env key="LEVELDB_PREFIX" value="${leveldb.prefix}"/>
</exec>
</tasks>
</configuration>
</execution>
<execution>
<phase>test</phase>
<id>go_test</id>
<goals><goal>run</goal></goals>
<configuration>
<tasks>
<exec executable="bash" failonerror="true" dir="${basedir}/go">
<arg value="-c"/>
<arg value="[ x$SKIPTESTS = xtrue ] || ./gobuild.sh test"/>
<env key="SKIPTESTS" value="${skipTests}"/>
</exec>
</tasks>
</configuration>
</execution>
<!--We used to call go/gobuild.sh clean here but it fails if
the first thing we do is mvn clean because this plugin
expects all plugins to be in place. Instead use the
below maven-clean-plugin to clean out any extra go dirs.
-->
</executions>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>2.6.1</version>
<configuration>
<filesets>
<fileset>
<directory>bin</directory>
</fileset>
<!--Below dirs must match what gobuild.sh clean does.-->
<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>
<dependencies>
<!-- Module deps. -->
<dependency>
<groupId>org.apache.htrace</groupId>
<artifactId>htrace-core4</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.htrace</groupId>
<artifactId>htrace-core4</artifactId>
<version>${project.version}</version>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.htrace</groupId>
<artifactId>htrace-webapp</artifactId>
<version>${project.version}</version>
<type>war</type>
<scope>provided</scope>
</dependency>
<!-- Global deps. -->
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<dependency>
<groupId>org.msgpack</groupId>
<artifactId>msgpack-core</artifactId>
<version>0.7.0-p9</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-client</artifactId>
<version>9.2.6.v20141205</version>
</dependency>
</dependencies>
<profiles>
<profile>
<id>rpm</id>
<activation><property><name>rpm</name></property></activation>
<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>
<goals><goal>rpm</goal></goals>
<phase>package</phase>
</execution>
</executions>
<configuration>
<group>Application</group>
<needarch>true</needarch>
<release>4.1.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.1.0-incubating-SNAPSHOT.jar</location>
</source>
</sources>
</mapping>
</mappings>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>