pom.xml 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  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. </dependencies>
  80. <build>
  81. <plugins>
  82. <plugin>
  83. <groupId>org.apache.maven.plugins</groupId>
  84. <artifactId>maven-surefire-plugin</artifactId>
  85. <configuration>
  86. <properties>
  87. <property>
  88. <name>listener</name>
  89. <value>org.apache.hadoop.test.TimedOutTestsListener</value>
  90. </property>
  91. </properties>
  92. <includes>
  93. <include>**/*Test.java</include>
  94. <include>**/Test*.java</include>
  95. </includes>
  96. </configuration>
  97. </plugin>
  98. <plugin>
  99. <groupId>org.apache.rat</groupId>
  100. <artifactId>apache-rat-plugin</artifactId>
  101. <configuration>
  102. <excludes>
  103. <exclude>src/main/native/testData/*</exclude>
  104. <exclude>**/lz4.h</exclude>
  105. <exclude>**/lz4.c</exclude>
  106. </excludes>
  107. </configuration>
  108. </plugin>
  109. </plugins>
  110. </build>
  111. <profiles>
  112. <profile>
  113. <id>native</id>
  114. <activation>
  115. <activeByDefault>false</activeByDefault>
  116. </activation>
  117. <properties>
  118. <snappy.prefix></snappy.prefix>
  119. <snappy.lib></snappy.lib>
  120. <snappy.include></snappy.include>
  121. <require.snappy>false</require.snappy>
  122. <zstd.prefix></zstd.prefix>
  123. <zstd.lib></zstd.lib>
  124. <zstd.include></zstd.include>
  125. <require.zstd>false</require.zstd>
  126. </properties>
  127. <build>
  128. <plugins>
  129. <plugin>
  130. <groupId>org.apache.maven.plugins</groupId>
  131. <artifactId>maven-enforcer-plugin</artifactId>
  132. <executions>
  133. <execution>
  134. <id>enforce-os</id>
  135. <goals>
  136. <goal>enforce</goal>
  137. </goals>
  138. <configuration>
  139. <rules>
  140. <requireOS>
  141. <family>mac</family>
  142. <family>unix</family>
  143. <message>native build only supported on Mac or
  144. Unix</message>
  145. </requireOS>
  146. </rules>
  147. <fail>true</fail>
  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}/src/main/native/lz4/lz4.h"
  165. todir="${project.build.directory}/native/" />
  166. <copy file="${basedir}/src/main/native/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. <REQUIRE_ZSTD>${require.zstd}</REQUIRE_ZSTD>
  195. <CUSTOM_ZSTD_PREFIX>${zstd.prefix}</CUSTOM_ZSTD_PREFIX>
  196. <CUSTOM_ZSTD_LIB>${zstd.lib}</CUSTOM_ZSTD_LIB>
  197. <CUSTOM_ZSTD_INCLUDE>${zstd.include}</CUSTOM_ZSTD_INCLUDE>
  198. </vars>
  199. </configuration>
  200. </execution>
  201. <execution>
  202. <id>nttest</id>
  203. <phase>test</phase>
  204. <goals><goal>cmake-test</goal></goals>
  205. <configuration>
  206. <!-- this should match the xml name without the TEST-part down below -->
  207. <testName>nativetask-nttest</testName>
  208. <workingDirectory>${project.build.directory}/native/test</workingDirectory>
  209. <source>${basedir}/src</source>
  210. <binary>${project.build.directory}/native/test/nttest</binary>
  211. <args>
  212. <arg>--gtest_filter=-Perf.</arg>
  213. <arg>--gtest_output=xml:${project.build.directory}/surefire-reports/TEST-nativetask-nttest.xml</arg>
  214. </args>
  215. <results>${project.build.directory}/surefire-reports</results>
  216. </configuration>
  217. </execution>
  218. </executions>
  219. </plugin>
  220. </plugins>
  221. </build>
  222. </profile>
  223. </profiles>
  224. </project>