pom.xml 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  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.0.0-alpha2-SNAPSHOT</version>
  21. </parent>
  22. <modelVersion>4.0.0</modelVersion>
  23. <groupId>org.apache.hadoop</groupId>
  24. <artifactId>hadoop-mapreduce-client-nativetask</artifactId>
  25. <version>3.0.0-alpha2-SNAPSHOT</version>
  26. <name>Apache Hadoop MapReduce NativeTask</name>
  27. <properties>
  28. <!-- Needed for generating FindBugs warnings using parent pom -->
  29. <mr.basedir>${project.parent.basedir}/../</mr.basedir>
  30. </properties>
  31. <dependencies>
  32. <dependency>
  33. <groupId>org.apache.hadoop</groupId>
  34. <artifactId>hadoop-common</artifactId>
  35. </dependency>
  36. <dependency>
  37. <groupId>org.apache.hadoop</groupId>
  38. <artifactId>hadoop-mapreduce-client-core</artifactId>
  39. </dependency>
  40. <dependency>
  41. <groupId>org.apache.avro</groupId>
  42. <artifactId>avro</artifactId>
  43. <scope>test</scope>
  44. </dependency>
  45. <dependency>
  46. <groupId>junit</groupId>
  47. <artifactId>junit</artifactId>
  48. <scope>test</scope>
  49. </dependency>
  50. <dependency>
  51. <groupId>org.mockito</groupId>
  52. <artifactId>mockito-all</artifactId>
  53. <scope>test</scope>
  54. </dependency>
  55. <dependency>
  56. <groupId>org.apache.hadoop</groupId>
  57. <artifactId>hadoop-common</artifactId>
  58. <type>test-jar</type>
  59. <scope>test</scope>
  60. </dependency>
  61. <dependency>
  62. <groupId>org.apache.hadoop</groupId>
  63. <artifactId>hadoop-mapreduce-client-common</artifactId>
  64. <scope>test</scope>
  65. </dependency>
  66. </dependencies>
  67. <build>
  68. <plugins>
  69. <plugin>
  70. <groupId>org.apache.maven.plugins</groupId>
  71. <artifactId>maven-surefire-plugin</artifactId>
  72. <configuration>
  73. <properties>
  74. <property>
  75. <name>listener</name>
  76. <value>org.apache.hadoop.test.TimedOutTestsListener</value>
  77. </property>
  78. </properties>
  79. <includes>
  80. <include>**/*Test.java</include>
  81. <include>**/Test*.java</include>
  82. </includes>
  83. </configuration>
  84. </plugin>
  85. <plugin>
  86. <groupId>org.apache.rat</groupId>
  87. <artifactId>apache-rat-plugin</artifactId>
  88. <configuration>
  89. <excludes>
  90. <exclude>src/main/native/testData/*</exclude>
  91. <!-- gtest has a compatible license -->
  92. <exclude>src/main/native/gtest/**/*</exclude>
  93. </excludes>
  94. </configuration>
  95. </plugin>
  96. </plugins>
  97. </build>
  98. <profiles>
  99. <profile>
  100. <id>native</id>
  101. <activation>
  102. <activeByDefault>false</activeByDefault>
  103. </activation>
  104. <properties>
  105. <snappy.prefix></snappy.prefix>
  106. <snappy.lib></snappy.lib>
  107. <snappy.include></snappy.include>
  108. <require.snappy>false</require.snappy>
  109. </properties>
  110. <build>
  111. <plugins>
  112. <plugin>
  113. <groupId>org.apache.maven.plugins</groupId>
  114. <artifactId>maven-enforcer-plugin</artifactId>
  115. <executions>
  116. <execution>
  117. <id>enforce-os</id>
  118. <goals>
  119. <goal>enforce</goal>
  120. </goals>
  121. <configuration>
  122. <rules>
  123. <requireOS>
  124. <family>mac</family>
  125. <family>unix</family>
  126. <message>native build only supported on Mac or
  127. Unix</message>
  128. </requireOS>
  129. </rules>
  130. <fail>true</fail>
  131. </configuration>
  132. </execution>
  133. </executions>
  134. </plugin>
  135. <plugin>
  136. <groupId>org.codehaus.mojo</groupId>
  137. <artifactId>native-maven-plugin</artifactId>
  138. <executions>
  139. <execution>
  140. <phase>compile</phase>
  141. <goals>
  142. <goal>javah</goal>
  143. </goals>
  144. <configuration>
  145. <javahPath>${env.JAVA_HOME}/bin/javah</javahPath>
  146. <javahClassNames>
  147. <javaClassName>org.apache.hadoop.mapred.nativetask.NativeBatchProcessor</javaClassName>
  148. <javaClassName>org.apache.hadoop.mapred.nativetask.NativeRuntime</javaClassName>
  149. </javahClassNames>
  150. <javahOutputDirectory>${project.build.directory}/native/javah</javahOutputDirectory>
  151. </configuration>
  152. </execution>
  153. </executions>
  154. </plugin>
  155. <plugin>
  156. <groupId>org.apache.maven.plugins</groupId>
  157. <artifactId>maven-antrun-plugin</artifactId>
  158. <executions>
  159. <execution>
  160. <id>make</id>
  161. <phase>compile</phase>
  162. <goals>
  163. <goal>run</goal>
  164. </goals>
  165. <configuration>
  166. <target>
  167. <copy file="${basedir}/../../../hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4.h"
  168. todir="${project.build.directory}/native/" />
  169. <copy file="${basedir}/../../../hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4.c"
  170. todir="${project.build.directory}/native/" />
  171. <copy todir="${project.build.directory}/native/test/testData"
  172. overwrite="true">
  173. <fileset dir="${basedir}/src/main/native/testData" />
  174. </copy>
  175. </target>
  176. </configuration>
  177. </execution>
  178. </executions>
  179. </plugin>
  180. <plugin>
  181. <groupId>org.apache.hadoop</groupId>
  182. <artifactId>hadoop-maven-plugins</artifactId>
  183. <executions>
  184. <execution>
  185. <id>cmake-compile</id>
  186. <phase>compile</phase>
  187. <goals><goal>cmake-compile</goal></goals>
  188. <configuration>
  189. <source>${basedir}/src</source>
  190. <vars>
  191. <GENERATED_JAVAH>${project.build.directory}/native/javah</GENERATED_JAVAH>
  192. <JVM_ARCH_DATA_MODEL>${sun.arch.data.model}</JVM_ARCH_DATA_MODEL>
  193. <REQUIRE_SNAPPY>${require.snappy}</REQUIRE_SNAPPY>
  194. <CUSTOM_SNAPPY_PREFIX>${snappy.prefix}</CUSTOM_SNAPPY_PREFIX>
  195. <CUSTOM_SNAPPY_LIB>${snappy.lib}</CUSTOM_SNAPPY_LIB>
  196. <CUSTOM_SNAPPY_INCLUDE>${snappy.include}</CUSTOM_SNAPPY_INCLUDE>
  197. </vars>
  198. </configuration>
  199. </execution>
  200. <execution>
  201. <id>nttest</id>
  202. <phase>test</phase>
  203. <goals><goal>cmake-test</goal></goals>
  204. <configuration>
  205. <testName>test-native-task</testName>
  206. <workingDirectory>${project.build.directory}/native/test</workingDirectory>
  207. <source>${basedir}/src</source>
  208. <binary>${project.build.directory}/native/test/nttest</binary>
  209. <args><arg>--gtest_filter=-Perf.</arg></args>
  210. <results>${project.build.directory}/native/test/native-results</results>
  211. </configuration>
  212. </execution>
  213. </executions>
  214. </plugin>
  215. </plugins>
  216. </build>
  217. </profile>
  218. </profiles>
  219. </project>