pom.xml 8.0 KB

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