pom.xml 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License. See accompanying LICENSE file.
  12. -->
  13. <project xmlns="http://maven.apache.org/POM/4.0.0"
  14. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  15. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
  16. http://maven.apache.org/xsd/maven-4.0.0.xsd">
  17. <parent>
  18. <artifactId>hadoop-mapreduce-client</artifactId>
  19. <groupId>org.apache.hadoop</groupId>
  20. <version>3.0.0-alpha2-SNAPSHOT</version>
  21. </parent>
  22. <modelVersion>4.0.0</modelVersion>
  23. <artifactId>hadoop-mapreduce-client-nativetask</artifactId>
  24. <version>3.0.0-alpha2-SNAPSHOT</version>
  25. <name>Apache Hadoop MapReduce NativeTask</name>
  26. <properties>
  27. <!-- Needed for generating FindBugs warnings using parent pom -->
  28. <mr.basedir>${project.parent.basedir}/../</mr.basedir>
  29. </properties>
  30. <dependencies>
  31. <dependency>
  32. <groupId>org.apache.hadoop</groupId>
  33. <artifactId>hadoop-common</artifactId>
  34. </dependency>
  35. <dependency>
  36. <groupId>org.apache.hadoop</groupId>
  37. <artifactId>hadoop-mapreduce-client-core</artifactId>
  38. </dependency>
  39. <dependency>
  40. <groupId>org.apache.avro</groupId>
  41. <artifactId>avro</artifactId>
  42. <scope>test</scope>
  43. </dependency>
  44. <dependency>
  45. <groupId>junit</groupId>
  46. <artifactId>junit</artifactId>
  47. <scope>test</scope>
  48. </dependency>
  49. <dependency>
  50. <groupId>org.mockito</groupId>
  51. <artifactId>mockito-all</artifactId>
  52. <scope>test</scope>
  53. </dependency>
  54. <dependency>
  55. <groupId>org.apache.hadoop</groupId>
  56. <artifactId>hadoop-common</artifactId>
  57. <type>test-jar</type>
  58. <scope>test</scope>
  59. </dependency>
  60. <dependency>
  61. <groupId>org.apache.hadoop</groupId>
  62. <artifactId>hadoop-mapreduce-client-common</artifactId>
  63. <scope>test</scope>
  64. </dependency>
  65. </dependencies>
  66. <build>
  67. <plugins>
  68. <plugin>
  69. <groupId>org.apache.maven.plugins</groupId>
  70. <artifactId>maven-surefire-plugin</artifactId>
  71. <configuration>
  72. <properties>
  73. <property>
  74. <name>listener</name>
  75. <value>org.apache.hadoop.test.TimedOutTestsListener</value>
  76. </property>
  77. </properties>
  78. <includes>
  79. <include>**/*Test.java</include>
  80. <include>**/Test*.java</include>
  81. </includes>
  82. </configuration>
  83. </plugin>
  84. <plugin>
  85. <groupId>org.apache.rat</groupId>
  86. <artifactId>apache-rat-plugin</artifactId>
  87. <configuration>
  88. <excludes>
  89. <exclude>src/main/native/testData/*</exclude>
  90. </excludes>
  91. </configuration>
  92. </plugin>
  93. </plugins>
  94. </build>
  95. <profiles>
  96. <profile>
  97. <id>native</id>
  98. <activation>
  99. <activeByDefault>false</activeByDefault>
  100. </activation>
  101. <properties>
  102. <snappy.prefix></snappy.prefix>
  103. <snappy.lib></snappy.lib>
  104. <snappy.include></snappy.include>
  105. <require.snappy>false</require.snappy>
  106. </properties>
  107. <build>
  108. <plugins>
  109. <plugin>
  110. <groupId>org.apache.maven.plugins</groupId>
  111. <artifactId>maven-enforcer-plugin</artifactId>
  112. <executions>
  113. <execution>
  114. <id>enforce-os</id>
  115. <goals>
  116. <goal>enforce</goal>
  117. </goals>
  118. <configuration>
  119. <rules>
  120. <requireOS>
  121. <family>mac</family>
  122. <family>unix</family>
  123. <message>native build only supported on Mac or
  124. Unix</message>
  125. </requireOS>
  126. </rules>
  127. <fail>true</fail>
  128. </configuration>
  129. </execution>
  130. </executions>
  131. </plugin>
  132. <plugin>
  133. <groupId>org.codehaus.mojo</groupId>
  134. <artifactId>native-maven-plugin</artifactId>
  135. <executions>
  136. <execution>
  137. <phase>compile</phase>
  138. <goals>
  139. <goal>javah</goal>
  140. </goals>
  141. <configuration>
  142. <javahPath>${env.JAVA_HOME}/bin/javah</javahPath>
  143. <javahClassNames>
  144. <javaClassName>org.apache.hadoop.mapred.nativetask.NativeBatchProcessor</javaClassName>
  145. <javaClassName>org.apache.hadoop.mapred.nativetask.NativeRuntime</javaClassName>
  146. </javahClassNames>
  147. <javahOutputDirectory>${project.build.directory}/native/javah</javahOutputDirectory>
  148. </configuration>
  149. </execution>
  150. </executions>
  151. </plugin>
  152. <plugin>
  153. <groupId>org.apache.maven.plugins</groupId>
  154. <artifactId>maven-antrun-plugin</artifactId>
  155. <executions>
  156. <execution>
  157. <id>make</id>
  158. <phase>compile</phase>
  159. <goals>
  160. <goal>run</goal>
  161. </goals>
  162. <configuration>
  163. <target>
  164. <copy file="${basedir}/../../../hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4.h"
  165. todir="${project.build.directory}/native/" />
  166. <copy file="${basedir}/../../../hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4.c"
  167. todir="${project.build.directory}/native/" />
  168. <copy todir="${project.build.directory}/native/test/testData"
  169. overwrite="true">
  170. <fileset dir="${basedir}/src/main/native/testData" />
  171. </copy>
  172. </target>
  173. </configuration>
  174. </execution>
  175. </executions>
  176. </plugin>
  177. <plugin>
  178. <groupId>org.apache.hadoop</groupId>
  179. <artifactId>hadoop-maven-plugins</artifactId>
  180. <executions>
  181. <execution>
  182. <id>cmake-compile</id>
  183. <phase>compile</phase>
  184. <goals><goal>cmake-compile</goal></goals>
  185. <configuration>
  186. <source>${basedir}/src</source>
  187. <vars>
  188. <GENERATED_JAVAH>${project.build.directory}/native/javah</GENERATED_JAVAH>
  189. <JVM_ARCH_DATA_MODEL>${sun.arch.data.model}</JVM_ARCH_DATA_MODEL>
  190. <REQUIRE_SNAPPY>${require.snappy}</REQUIRE_SNAPPY>
  191. <CUSTOM_SNAPPY_PREFIX>${snappy.prefix}</CUSTOM_SNAPPY_PREFIX>
  192. <CUSTOM_SNAPPY_LIB>${snappy.lib}</CUSTOM_SNAPPY_LIB>
  193. <CUSTOM_SNAPPY_INCLUDE>${snappy.include}</CUSTOM_SNAPPY_INCLUDE>
  194. </vars>
  195. </configuration>
  196. </execution>
  197. <execution>
  198. <id>nttest</id>
  199. <phase>test</phase>
  200. <goals><goal>cmake-test</goal></goals>
  201. <configuration>
  202. <!-- this should match the xml name without the TEST-part down below -->
  203. <testName>nativetask-nttest</testName>
  204. <workingDirectory>${project.build.directory}/native/test</workingDirectory>
  205. <source>${basedir}/src</source>
  206. <binary>${project.build.directory}/native/test/nttest</binary>
  207. <args>
  208. <arg>--gtest_filter=-Perf.</arg>
  209. <arg>--gtest_output=xml:${project.build.directory}/surefire-reports/TEST-nativetask-nttest.xml</arg>
  210. </args>
  211. <results>${project.build.directory}/surefire-reports</results>
  212. </configuration>
  213. </execution>
  214. </executions>
  215. </plugin>
  216. </plugins>
  217. </build>
  218. </profile>
  219. </profiles>
  220. </project>