pom.xml 7.6 KB

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