pom.xml 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  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. https://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.5.0-SNAPSHOT</version>
  21. </parent>
  22. <modelVersion>4.0.0</modelVersion>
  23. <artifactId>hadoop-mapreduce-client-nativetask</artifactId>
  24. <version>3.5.0-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>org.apache.hadoop</groupId>
  46. <artifactId>hadoop-mapreduce-client-common</artifactId>
  47. <scope>test</scope>
  48. </dependency>
  49. <dependency>
  50. <groupId>org.assertj</groupId>
  51. <artifactId>assertj-core</artifactId>
  52. <scope>test</scope>
  53. </dependency>
  54. <dependency>
  55. <groupId>org.lz4</groupId>
  56. <artifactId>lz4-java</artifactId>
  57. <scope>test</scope>
  58. </dependency>
  59. <dependency>
  60. <groupId>org.junit.jupiter</groupId>
  61. <artifactId>junit-jupiter-api</artifactId>
  62. <scope>test</scope>
  63. </dependency>
  64. <dependency>
  65. <groupId>org.junit.jupiter</groupId>
  66. <artifactId>junit-jupiter-engine</artifactId>
  67. <scope>test</scope>
  68. </dependency>
  69. <dependency>
  70. <groupId>org.junit.jupiter</groupId>
  71. <artifactId>junit-jupiter-params</artifactId>
  72. <scope>test</scope>
  73. </dependency>
  74. <dependency>
  75. <groupId>org.junit.platform</groupId>
  76. <artifactId>junit-platform-launcher</artifactId>
  77. <scope>test</scope>
  78. </dependency>
  79. <dependency>
  80. <groupId>org.junit.vintage</groupId>
  81. <artifactId>junit-vintage-engine</artifactId>
  82. <scope>test</scope>
  83. </dependency>
  84. </dependencies>
  85. <build>
  86. <plugins>
  87. <plugin>
  88. <groupId>org.apache.maven.plugins</groupId>
  89. <artifactId>maven-surefire-plugin</artifactId>
  90. <configuration>
  91. <properties>
  92. <property>
  93. <name>listener</name>
  94. <value>org.apache.hadoop.test.TimedOutTestsListener</value>
  95. </property>
  96. </properties>
  97. <includes>
  98. <include>**/*Test.java</include>
  99. <include>**/Test*.java</include>
  100. </includes>
  101. </configuration>
  102. </plugin>
  103. <plugin>
  104. <groupId>org.apache.rat</groupId>
  105. <artifactId>apache-rat-plugin</artifactId>
  106. <configuration>
  107. <excludes>
  108. <exclude>src/main/native/testData/*</exclude>
  109. <exclude>**/lz4.h</exclude>
  110. <exclude>**/lz4.c</exclude>
  111. </excludes>
  112. </configuration>
  113. </plugin>
  114. </plugins>
  115. </build>
  116. <profiles>
  117. <profile>
  118. <id>native</id>
  119. <activation>
  120. <activeByDefault>false</activeByDefault>
  121. </activation>
  122. <properties>
  123. <snappy.prefix></snappy.prefix>
  124. <snappy.lib></snappy.lib>
  125. <snappy.include></snappy.include>
  126. <require.snappy>false</require.snappy>
  127. <zstd.prefix></zstd.prefix>
  128. <zstd.lib></zstd.lib>
  129. <zstd.include></zstd.include>
  130. <require.zstd>false</require.zstd>
  131. </properties>
  132. <build>
  133. <plugins>
  134. <plugin>
  135. <groupId>org.apache.maven.plugins</groupId>
  136. <artifactId>maven-enforcer-plugin</artifactId>
  137. <executions>
  138. <execution>
  139. <id>enforce-os</id>
  140. <goals>
  141. <goal>enforce</goal>
  142. </goals>
  143. <configuration>
  144. <rules>
  145. <requireOS>
  146. <family>mac</family>
  147. <family>unix</family>
  148. <message>native build only supported on Mac or
  149. Unix</message>
  150. </requireOS>
  151. </rules>
  152. <fail>true</fail>
  153. </configuration>
  154. </execution>
  155. </executions>
  156. </plugin>
  157. <plugin>
  158. <groupId>org.apache.maven.plugins</groupId>
  159. <artifactId>maven-antrun-plugin</artifactId>
  160. <executions>
  161. <execution>
  162. <id>make</id>
  163. <phase>compile</phase>
  164. <goals>
  165. <goal>run</goal>
  166. </goals>
  167. <configuration>
  168. <target>
  169. <copy file="${basedir}/src/main/native/lz4/lz4.h"
  170. todir="${project.build.directory}/native/" />
  171. <copy file="${basedir}/src/main/native/lz4/lz4.c"
  172. todir="${project.build.directory}/native/" />
  173. <copy todir="${project.build.directory}/native/test/testData"
  174. overwrite="true">
  175. <fileset dir="${basedir}/src/main/native/testData" />
  176. </copy>
  177. </target>
  178. </configuration>
  179. </execution>
  180. </executions>
  181. </plugin>
  182. <plugin>
  183. <groupId>org.apache.hadoop</groupId>
  184. <artifactId>hadoop-maven-plugins</artifactId>
  185. <executions>
  186. <execution>
  187. <id>cmake-compile</id>
  188. <phase>compile</phase>
  189. <goals><goal>cmake-compile</goal></goals>
  190. <configuration>
  191. <source>${basedir}/src</source>
  192. <vars>
  193. <GENERATED_JAVAH>${project.build.directory}/native/javah</GENERATED_JAVAH>
  194. <JVM_ARCH_DATA_MODEL>${sun.arch.data.model}</JVM_ARCH_DATA_MODEL>
  195. <REQUIRE_SNAPPY>${require.snappy}</REQUIRE_SNAPPY>
  196. <CUSTOM_SNAPPY_PREFIX>${snappy.prefix}</CUSTOM_SNAPPY_PREFIX>
  197. <CUSTOM_SNAPPY_LIB>${snappy.lib}</CUSTOM_SNAPPY_LIB>
  198. <CUSTOM_SNAPPY_INCLUDE>${snappy.include}</CUSTOM_SNAPPY_INCLUDE>
  199. <REQUIRE_ZSTD>${require.zstd}</REQUIRE_ZSTD>
  200. <CUSTOM_ZSTD_PREFIX>${zstd.prefix}</CUSTOM_ZSTD_PREFIX>
  201. <CUSTOM_ZSTD_LIB>${zstd.lib}</CUSTOM_ZSTD_LIB>
  202. <CUSTOM_ZSTD_INCLUDE>${zstd.include}</CUSTOM_ZSTD_INCLUDE>
  203. </vars>
  204. </configuration>
  205. </execution>
  206. <execution>
  207. <id>nttest</id>
  208. <phase>test</phase>
  209. <goals><goal>cmake-test</goal></goals>
  210. <configuration>
  211. <!-- this should match the xml name without the TEST-part down below -->
  212. <testName>nativetask-nttest</testName>
  213. <workingDirectory>${project.build.directory}/native/test</workingDirectory>
  214. <source>${basedir}/src</source>
  215. <binary>${project.build.directory}/native/test/nttest</binary>
  216. <args>
  217. <arg>--gtest_filter=-Perf.</arg>
  218. <arg>--gtest_output=xml:${project.build.directory}/surefire-reports/TEST-nativetask-nttest.xml</arg>
  219. </args>
  220. <results>${project.build.directory}/surefire-reports</results>
  221. </configuration>
  222. </execution>
  223. </executions>
  224. </plugin>
  225. </plugins>
  226. </build>
  227. </profile>
  228. </profiles>
  229. </project>