pom.xml 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  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-SNAPSHOT</version>
  21. </parent>
  22. <modelVersion>4.0.0</modelVersion>
  23. <groupId>org.apache.hadoop</groupId>
  24. <artifactId>hadoop-mapreduce-client-nativetask</artifactId>
  25. <version>3.0.0-SNAPSHOT</version>
  26. <name>hadoop-mapreduce-client-nativetask</name>
  27. <properties>
  28. <!-- Needed for generating FindBugs warnings using parent pom -->
  29. <mr.basedir>${project.parent.basedir}/../</mr.basedir>
  30. </properties>
  31. <dependencies>
  32. <dependency>
  33. <groupId>org.apache.hadoop</groupId>
  34. <artifactId>hadoop-common</artifactId>
  35. </dependency>
  36. <dependency>
  37. <groupId>org.apache.hadoop</groupId>
  38. <artifactId>hadoop-mapreduce-client-core</artifactId>
  39. </dependency>
  40. <dependency>
  41. <groupId>org.apache.avro</groupId>
  42. <artifactId>avro</artifactId>
  43. <scope>test</scope>
  44. </dependency>
  45. <dependency>
  46. <groupId>junit</groupId>
  47. <artifactId>junit</artifactId>
  48. <scope>test</scope>
  49. </dependency>
  50. <dependency>
  51. <groupId>org.mockito</groupId>
  52. <artifactId>mockito-all</artifactId>
  53. <scope>test</scope>
  54. </dependency>
  55. <dependency>
  56. <groupId>org.apache.hadoop</groupId>
  57. <artifactId>hadoop-common</artifactId>
  58. <type>test-jar</type>
  59. <scope>test</scope>
  60. </dependency>
  61. <dependency>
  62. <groupId>org.apache.hadoop</groupId>
  63. <artifactId>hadoop-mapreduce-client-common</artifactId>
  64. <type>test-jar</type>
  65. <scope>test</scope>
  66. </dependency>
  67. </dependencies>
  68. <build>
  69. <plugins>
  70. <plugin>
  71. <groupId>org.apache.maven.plugins</groupId>
  72. <artifactId>maven-surefire-plugin</artifactId>
  73. <configuration>
  74. <properties>
  75. <property>
  76. <name>listener</name>
  77. <value>org.apache.hadoop.test.TimedOutTestsListener</value>
  78. </property>
  79. </properties>
  80. <includes>
  81. <include>**/TestTaskContext.java</include>
  82. <include>**/buffer/Test*.java</include>
  83. <include>**/handlers/Test*.java</include>
  84. <include>**/serde/Test*.java</include>
  85. </includes>
  86. </configuration>
  87. </plugin>
  88. </plugins>
  89. </build>
  90. <profiles>
  91. <profile>
  92. <id>native</id>
  93. <activation>
  94. <activeByDefault>false</activeByDefault>
  95. </activation>
  96. <properties>
  97. <snappy.prefix></snappy.prefix>
  98. <snappy.lib></snappy.lib>
  99. <snappy.include></snappy.include>
  100. <require.snappy>false</require.snappy>
  101. </properties>
  102. <build>
  103. <plugins>
  104. <plugin>
  105. <groupId>org.apache.maven.plugins</groupId>
  106. <artifactId>maven-enforcer-plugin</artifactId>
  107. <executions>
  108. <execution>
  109. <id>enforce-os</id>
  110. <goals>
  111. <goal>enforce</goal>
  112. </goals>
  113. <configuration>
  114. <rules>
  115. <requireOS>
  116. <family>mac</family>
  117. <family>unix</family>
  118. <message>native build only supported on Mac or
  119. Unix</message>
  120. </requireOS>
  121. </rules>
  122. <fail>true</fail>
  123. </configuration>
  124. </execution>
  125. </executions>
  126. </plugin>
  127. <plugin>
  128. <groupId>org.codehaus.mojo</groupId>
  129. <artifactId>native-maven-plugin</artifactId>
  130. <executions>
  131. <execution>
  132. <phase>compile</phase>
  133. <goals>
  134. <goal>javah</goal>
  135. </goals>
  136. <configuration>
  137. <javahPath>${env.JAVA_HOME}/bin/javah</javahPath>
  138. <javahClassNames>
  139. <javaClassName>org.apache.hadoop.mapred.nativetask.NativeBatchProcessor</javaClassName>
  140. <javaClassName>org.apache.hadoop.mapred.nativetask.NativeRuntime</javaClassName>
  141. </javahClassNames>
  142. <javahOutputDirectory>${project.build.directory}/native/javah</javahOutputDirectory>
  143. </configuration>
  144. </execution>
  145. </executions>
  146. </plugin>
  147. <plugin>
  148. <groupId>org.apache.maven.plugins</groupId>
  149. <artifactId>maven-antrun-plugin</artifactId>
  150. <executions>
  151. <execution>
  152. <id>make</id>
  153. <phase>compile</phase>
  154. <goals>
  155. <goal>run</goal>
  156. </goals>
  157. <configuration>
  158. <target>
  159. <copy file="${basedir}/../../../hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4.h"
  160. todir="${project.build.directory}/native/" />
  161. <copy file="${basedir}/../../../hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4_encoder.h"
  162. todir="${project.build.directory}/native/" />
  163. <copy file="${basedir}/../../../hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4.c"
  164. todir="${project.build.directory}/native/" />
  165. <copy todir="${project.build.directory}/native/test/testData"
  166. overwrite="true">
  167. <fileset dir="${basedir}/src/main/native/testData" />
  168. </copy>
  169. <copy file="${basedir}/src/main/native/test.sh" todir="${project.build.directory}/native/test" />
  170. <exec executable="cmake" dir="${project.build.directory}/native"
  171. failonerror="true">
  172. <arg line="${basedir}/src/ -DGENERATED_JAVAH=${project.build.directory}/native/javah -DJVM_ARCH_DATA_MODEL=${sun.arch.data.model} -DREQUIRE_SNAPPY=${require.snappy} -DCUSTOM_SNAPPY_PREFIX=${snappy.prefix} -DCUSTOM_SNAPPY_LIB=${snappy.lib} -DCUSTOM_SNAPPY_INCLUDE=${snappy.include}" />
  173. </exec>
  174. <exec executable="make" dir="${project.build.directory}/native" failonerror="true">
  175. <arg line="VERBOSE=1" />
  176. </exec>
  177. <!-- The second make is a workaround for HADOOP-9215. It can be
  178. removed when version 2.6 of cmake is no longer supported . -->
  179. <exec executable="make" dir="${project.build.directory}/native" failonerror="true"></exec>
  180. </target>
  181. </configuration>
  182. </execution>
  183. </executions>
  184. </plugin>
  185. <plugin>
  186. <groupId>org.apache.maven.plugins</groupId>
  187. <artifactId>maven-surefire-plugin</artifactId>
  188. <configuration>
  189. <properties>
  190. <property>
  191. <name>listener</name>
  192. <value>org.apache.hadoop.test.TimedOutTestsListener</value>
  193. </property>
  194. </properties>
  195. <includes>
  196. <include>**/TestTaskContext.java</include>
  197. <include>**/buffer/Test*.java</include>
  198. <include>**/handlers/Test*.java</include>
  199. <include>**/serde/Test*.java</include>
  200. <include>**/combinertest/*Test.java</include>
  201. <include>**/compresstest/*Test.java</include>
  202. <include>**/nonsorttest/*Test.java</include>
  203. <include>**/kvtest/*Test.java</include>
  204. </includes>
  205. </configuration>
  206. </plugin>
  207. </plugins>
  208. </build>
  209. </profile>
  210. </profiles>
  211. </project>