pom.xml 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  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-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-SNAPSHOT</version>
  26. <name>hadoop-mapreduce-client-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. </dependencies>
  62. <build>
  63. <plugins>
  64. <plugin>
  65. <groupId>org.apache.maven.plugins</groupId>
  66. <artifactId>maven-surefire-plugin</artifactId>
  67. <configuration>
  68. <properties>
  69. <property>
  70. <name>listener</name>
  71. <value>org.apache.hadoop.test.TimedOutTestsListener</value>
  72. </property>
  73. </properties>
  74. <includes>
  75. <include>**/TestTaskContext.java</include>
  76. <include>**/buffer/Test*.java</include>
  77. <include>**/handlers/Test*.java</include>
  78. <include>**/serde/Test*.java</include>
  79. <include>**/combinertest/*Test.java</include>
  80. <include>**/compresstest/*Test.java</include>
  81. <include>**/nonsorttest/*Test.java</include>
  82. <include>**/kvtest/*Test.java</include>
  83. </includes>
  84. <additionalClasspathElements>
  85. <additionalClasspathElement>${basedir}/../hadoop-mapreduce-client-common/target/classes</additionalClasspathElement>
  86. </additionalClasspathElements>
  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. </properties>
  103. <build>
  104. <plugins>
  105. <plugin>
  106. <groupId>org.apache.maven.plugins</groupId>
  107. <artifactId>maven-enforcer-plugin</artifactId>
  108. <executions>
  109. <execution>
  110. <id>enforce-os</id>
  111. <goals>
  112. <goal>enforce</goal>
  113. </goals>
  114. <configuration>
  115. <rules>
  116. <requireOS>
  117. <family>mac</family>
  118. <family>unix</family>
  119. <message>native build only supported on Mac or
  120. Unix</message>
  121. </requireOS>
  122. </rules>
  123. <fail>true</fail>
  124. </configuration>
  125. </execution>
  126. </executions>
  127. </plugin>
  128. <plugin>
  129. <groupId>org.codehaus.mojo</groupId>
  130. <artifactId>native-maven-plugin</artifactId>
  131. <executions>
  132. <execution>
  133. <phase>compile</phase>
  134. <goals>
  135. <goal>javah</goal>
  136. </goals>
  137. <configuration>
  138. <javahPath>${env.JAVA_HOME}/bin/javah</javahPath>
  139. <javahClassNames>
  140. <javaClassName>org.apache.hadoop.mapred.nativetask.NativeBatchProcessor</javaClassName>
  141. <javaClassName>org.apache.hadoop.mapred.nativetask.NativeRuntime</javaClassName>
  142. </javahClassNames>
  143. <javahOutputDirectory>${project.build.directory}/native/javah</javahOutputDirectory>
  144. </configuration>
  145. </execution>
  146. </executions>
  147. </plugin>
  148. <plugin>
  149. <groupId>org.apache.maven.plugins</groupId>
  150. <artifactId>maven-antrun-plugin</artifactId>
  151. <executions>
  152. <execution>
  153. <id>make</id>
  154. <phase>compile</phase>
  155. <goals>
  156. <goal>run</goal>
  157. </goals>
  158. <configuration>
  159. <target>
  160. <copy todir="${project.build.directory}/native/test/testData"
  161. overwrite="true">
  162. <fileset dir="${basedir}/src/main/native/testData" />
  163. </copy>
  164. <copy file="${basedir}/src/main/native/test.sh" todir="${project.build.directory}/native/test" />
  165. <exec executable="cmake" dir="${project.build.directory}/native"
  166. failonerror="true">
  167. <arg line="${basedir}/src/ -DGENERATED_JAVAH=${project.build.directory}/native/javah -DJVM_ARCH_DATA_MODEL=${sun.arch.data.model} -DREQUIRE_SNAPPY=${require.snappy} -DCUSTOM_SNAPPY_PREFIX=${snappy.prefix} -DCUSTOM_SNAPPY_LIB=${snappy.lib} -DCUSTOM_SNAPPY_INCLUDE=${snappy.include}" />
  168. </exec>
  169. <exec executable="make" dir="${project.build.directory}/native" failonerror="true">
  170. <arg line="VERBOSE=1" />
  171. </exec>
  172. <!-- The second make is a workaround for HADOOP-9215. It can be
  173. removed when version 2.6 of cmake is no longer supported . -->
  174. <exec executable="make" dir="${project.build.directory}/native" failonerror="true"></exec>
  175. </target>
  176. </configuration>
  177. </execution>
  178. </executions>
  179. </plugin>
  180. </plugins>
  181. </build>
  182. </profile>
  183. </profiles>
  184. </project>