pom.xml 8.1 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. 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.3.7-aws</version>
  21. </parent>
  22. <modelVersion>4.0.0</modelVersion>
  23. <artifactId>hadoop-mapreduce-client-nativetask</artifactId>
  24. <version>3.3.7-aws</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-core</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. <dependency>
  66. <groupId>org.assertj</groupId>
  67. <artifactId>assertj-core</artifactId>
  68. <scope>test</scope>
  69. </dependency>
  70. <dependency>
  71. <groupId>org.lz4</groupId>
  72. <artifactId>lz4-java</artifactId>
  73. <scope>test</scope>
  74. </dependency>
  75. </dependencies>
  76. <build>
  77. <plugins>
  78. <plugin>
  79. <groupId>org.apache.maven.plugins</groupId>
  80. <artifactId>maven-surefire-plugin</artifactId>
  81. <configuration>
  82. <properties>
  83. <property>
  84. <name>listener</name>
  85. <value>org.apache.hadoop.test.TimedOutTestsListener</value>
  86. </property>
  87. </properties>
  88. <includes>
  89. <include>**/*Test.java</include>
  90. <include>**/Test*.java</include>
  91. </includes>
  92. </configuration>
  93. </plugin>
  94. <plugin>
  95. <groupId>org.apache.rat</groupId>
  96. <artifactId>apache-rat-plugin</artifactId>
  97. <configuration>
  98. <excludes>
  99. <exclude>src/main/native/testData/*</exclude>
  100. <exclude>**/lz4.h</exclude>
  101. <exclude>**/lz4.c</exclude>
  102. </excludes>
  103. </configuration>
  104. </plugin>
  105. </plugins>
  106. </build>
  107. <profiles>
  108. <profile>
  109. <id>native</id>
  110. <activation>
  111. <activeByDefault>false</activeByDefault>
  112. </activation>
  113. <properties>
  114. <snappy.prefix></snappy.prefix>
  115. <snappy.lib></snappy.lib>
  116. <snappy.include></snappy.include>
  117. <require.snappy>false</require.snappy>
  118. <zstd.prefix></zstd.prefix>
  119. <zstd.lib></zstd.lib>
  120. <zstd.include></zstd.include>
  121. <require.zstd>false</require.zstd>
  122. </properties>
  123. <build>
  124. <plugins>
  125. <plugin>
  126. <groupId>org.apache.maven.plugins</groupId>
  127. <artifactId>maven-enforcer-plugin</artifactId>
  128. <executions>
  129. <execution>
  130. <id>enforce-os</id>
  131. <goals>
  132. <goal>enforce</goal>
  133. </goals>
  134. <configuration>
  135. <rules>
  136. <requireOS>
  137. <family>mac</family>
  138. <family>unix</family>
  139. <message>native build only supported on Mac or
  140. Unix</message>
  141. </requireOS>
  142. </rules>
  143. <fail>true</fail>
  144. </configuration>
  145. </execution>
  146. </executions>
  147. </plugin>
  148. <plugin>
  149. <groupId>org.apache.maven.plugins</groupId>
  150. <artifactId>maven-antrun-plugin</artifactId>
  151. <executions>
  152. <execution>
  153. <id>make</id>
  154. <phase>compile</phase>
  155. <goals>
  156. <goal>run</goal>
  157. </goals>
  158. <configuration>
  159. <target>
  160. <copy file="${basedir}/src/main/native/lz4/lz4.h"
  161. todir="${project.build.directory}/native/" />
  162. <copy file="${basedir}/src/main/native/lz4/lz4.c"
  163. todir="${project.build.directory}/native/" />
  164. <copy todir="${project.build.directory}/native/test/testData"
  165. overwrite="true">
  166. <fileset dir="${basedir}/src/main/native/testData" />
  167. </copy>
  168. </target>
  169. </configuration>
  170. </execution>
  171. </executions>
  172. </plugin>
  173. <plugin>
  174. <groupId>org.apache.hadoop</groupId>
  175. <artifactId>hadoop-maven-plugins</artifactId>
  176. <executions>
  177. <execution>
  178. <id>cmake-compile</id>
  179. <phase>compile</phase>
  180. <goals><goal>cmake-compile</goal></goals>
  181. <configuration>
  182. <source>${basedir}/src</source>
  183. <vars>
  184. <GENERATED_JAVAH>${project.build.directory}/native/javah</GENERATED_JAVAH>
  185. <JVM_ARCH_DATA_MODEL>${sun.arch.data.model}</JVM_ARCH_DATA_MODEL>
  186. <REQUIRE_SNAPPY>${require.snappy}</REQUIRE_SNAPPY>
  187. <CUSTOM_SNAPPY_PREFIX>${snappy.prefix}</CUSTOM_SNAPPY_PREFIX>
  188. <CUSTOM_SNAPPY_LIB>${snappy.lib}</CUSTOM_SNAPPY_LIB>
  189. <CUSTOM_SNAPPY_INCLUDE>${snappy.include}</CUSTOM_SNAPPY_INCLUDE>
  190. <REQUIRE_ZSTD>${require.zstd}</REQUIRE_ZSTD>
  191. <CUSTOM_ZSTD_PREFIX>${zstd.prefix}</CUSTOM_ZSTD_PREFIX>
  192. <CUSTOM_ZSTD_LIB>${zstd.lib}</CUSTOM_ZSTD_LIB>
  193. <CUSTOM_ZSTD_INCLUDE>${zstd.include}</CUSTOM_ZSTD_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>