blob: 201a06f489e08ffed1a0b7a898d96776c6359713 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed 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. See accompanying LICENSE file.
-->
<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-c</artifactId>
<packaging>jar</packaging>
<parent>
<artifactId>htrace</artifactId>
<groupId>org.apache.htrace</groupId>
<version>4.4.0-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<name>htrace-c</name>
<url>http://incubator.apache.org/projects/htrace.html</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jsonc.prefix></jsonc.prefix>
</properties>
<profiles>
<profile>
<id>native</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>enforce-os</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireOS>
<family>mac</family>
<family>unix</family>
<message>The native build is only supported on Mac and other UNIX systems.</message>
</requireOS>
</rules>
<fail>true</fail>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>make</id>
<phase>compile</phase>
<goals><goal>run</goal></goals>
<configuration>
<target>
<mkdir dir="${project.build.directory}/build"/>
<exec executable="cmake" dir="${project.build.directory}/build" failonerror="true">
<arg line="${basedir}/src -DCMAKE_INSTALL_PREFIX=${project.build.directory}/install -DJSON_C_PREFIX=${jsonc.prefix}"/>
</exec>
<exec executable="make" dir="${project.build.directory}/build" failonerror="true">
<arg line="install VERBOSE=1"/>
</exec>
</target>
</configuration>
</execution>
<execution>
<id>native_tests</id>
<phase>test</phase>
<goals><goal>run</goal></goals>
<configuration>
<target>
<exec executable="sh" dir="${project.build.directory}/build" failonerror="true">
<arg value="-c"/>
<arg value="[ x$SKIPTESTS = xtrue ] || make test"/>
<env key="SKIPTESTS" value="${skipTests}"/>
</exec>
</target>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>