pom.xml 7.9 KB

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