pom.xml 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313
  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" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  14. <modelVersion>4.0.0</modelVersion>
  15. <parent>
  16. <groupId>org.apache.hadoop</groupId>
  17. <artifactId>hadoop-project</artifactId>
  18. <version>3.4.0-SNAPSHOT</version>
  19. <relativePath>../hadoop-project</relativePath>
  20. </parent>
  21. <artifactId>hadoop-mapreduce</artifactId>
  22. <version>3.4.0-SNAPSHOT</version>
  23. <packaging>pom</packaging>
  24. <name>Apache Hadoop MapReduce</name>
  25. <url>https://hadoop.apache.org/</url>
  26. <properties>
  27. <test.logs>true</test.logs>
  28. <test.timeout>600000</test.timeout>
  29. <fork.mode>once</fork.mode>
  30. <mr.basedir>${basedir}</mr.basedir>
  31. <hadoop.component>mapreduce</hadoop.component>
  32. <is.hadoop.component>true</is.hadoop.component>
  33. </properties>
  34. <modules>
  35. <module>hadoop-mapreduce-client</module>
  36. <module>hadoop-mapreduce-examples</module>
  37. </modules>
  38. <dependencies>
  39. <dependency>
  40. <groupId>com.google.protobuf</groupId>
  41. <artifactId>protobuf-java</artifactId>
  42. </dependency>
  43. <dependency>
  44. <groupId>org.apache.avro</groupId>
  45. <artifactId>avro</artifactId>
  46. <exclusions>
  47. <exclusion>
  48. <groupId>org.eclipse.jetty</groupId>
  49. <artifactId>jetty-server</artifactId>
  50. </exclusion>
  51. <exclusion>
  52. <groupId>org.apache.ant</groupId>
  53. <artifactId>ant</artifactId>
  54. </exclusion>
  55. <exclusion>
  56. <groupId>io.netty</groupId>
  57. <artifactId>netty</artifactId>
  58. </exclusion>
  59. <exclusion>
  60. <groupId>org.apache.velocity</groupId>
  61. <artifactId>velocity</artifactId>
  62. </exclusion>
  63. <exclusion>
  64. <groupId>org.slf4j</groupId>
  65. <artifactId>slf4j-api</artifactId>
  66. </exclusion>
  67. <exclusion>
  68. <artifactId>paranamer-ant</artifactId>
  69. <groupId>com.thoughtworks.paranamer</groupId>
  70. </exclusion>
  71. <exclusion>
  72. <groupId>org.xerial.snappy</groupId>
  73. <artifactId>snappy-java</artifactId>
  74. </exclusion>
  75. </exclusions>
  76. </dependency>
  77. <dependency>
  78. <groupId>org.apache.hadoop</groupId>
  79. <artifactId>hadoop-common</artifactId>
  80. <scope>provided</scope>
  81. </dependency>
  82. <dependency>
  83. <groupId>org.slf4j</groupId>
  84. <artifactId>slf4j-api</artifactId>
  85. </dependency>
  86. <dependency>
  87. <groupId>org.slf4j</groupId>
  88. <artifactId>slf4j-log4j12</artifactId>
  89. </dependency>
  90. <dependency>
  91. <groupId>org.apache.hadoop</groupId>
  92. <artifactId>hadoop-annotations</artifactId>
  93. </dependency>
  94. <dependency>
  95. <groupId>org.mockito</groupId>
  96. <artifactId>mockito-core</artifactId>
  97. <scope>test</scope>
  98. </dependency>
  99. <dependency>
  100. <groupId>org.apache.hadoop</groupId>
  101. <artifactId>hadoop-common</artifactId>
  102. <type>test-jar</type>
  103. <scope>test</scope>
  104. </dependency>
  105. <dependency>
  106. <groupId>org.apache.hadoop</groupId>
  107. <artifactId>hadoop-hdfs</artifactId>
  108. <scope>test</scope>
  109. </dependency>
  110. <dependency>
  111. <groupId>com.google.inject</groupId>
  112. <artifactId>guice</artifactId>
  113. </dependency>
  114. <dependency>
  115. <groupId>com.sun.jersey</groupId>
  116. <artifactId>jersey-server</artifactId>
  117. </dependency>
  118. <dependency>
  119. <groupId>com.sun.jersey.contribs</groupId>
  120. <artifactId>jersey-guice</artifactId>
  121. </dependency>
  122. <dependency>
  123. <groupId>com.google.inject.extensions</groupId>
  124. <artifactId>guice-servlet</artifactId>
  125. </dependency>
  126. <dependency>
  127. <groupId>junit</groupId>
  128. <artifactId>junit</artifactId>
  129. </dependency>
  130. <dependency>
  131. <groupId>io.netty</groupId>
  132. <artifactId>netty</artifactId>
  133. </dependency>
  134. <dependency>
  135. <groupId>commons-io</groupId>
  136. <artifactId>commons-io</artifactId>
  137. </dependency>
  138. <dependency>
  139. <groupId>org.hsqldb</groupId>
  140. <artifactId>hsqldb</artifactId>
  141. <scope>compile</scope>
  142. </dependency>
  143. <dependency>
  144. <groupId>${leveldbjni.group}</groupId>
  145. <artifactId>leveldbjni-all</artifactId>
  146. </dependency>
  147. </dependencies>
  148. <build>
  149. <plugins>
  150. <plugin>
  151. <artifactId>maven-antrun-plugin</artifactId>
  152. <executions>
  153. <execution>
  154. <id>tar</id>
  155. <phase>package</phase>
  156. <goals>
  157. <goal>run</goal>
  158. </goals>
  159. <configuration>
  160. <!-- this is identical from hadoop-project-dist, eventually they must be unified -->
  161. <target if="tar">
  162. <!-- Using Unix script to preserve symlinks -->
  163. <echo file="${project.build.directory}/dist-maketar.sh">
  164. cd "${project.build.directory}"
  165. tar cf - ${project.artifactId}-${project.version} | gzip > ${project.artifactId}-${project.version}.tar.gz
  166. </echo>
  167. <exec executable="${shell-executable}" dir="${project.build.directory}" failonerror="true">
  168. <arg line="./dist-maketar.sh"/>
  169. </exec>
  170. </target>
  171. </configuration>
  172. </execution>
  173. </executions>
  174. </plugin>
  175. <plugin>
  176. <groupId>com.github.spotbugs</groupId>
  177. <artifactId>spotbugs-maven-plugin</artifactId>
  178. <configuration>
  179. <xmlOutput>true</xmlOutput>
  180. <excludeFilterFile>${mr.basedir}/dev-support/findbugs-exclude.xml</excludeFilterFile>
  181. <effort>Max</effort>
  182. </configuration>
  183. </plugin>
  184. <plugin>
  185. <groupId>org.apache.rat</groupId>
  186. <artifactId>apache-rat-plugin</artifactId>
  187. <configuration>
  188. <excludes>
  189. <exclude>.eclipse.templates/</exclude>
  190. <exclude>lib/jdiff/**</exclude>
  191. <exclude>dev-support/jdiff/**</exclude>
  192. </excludes>
  193. </configuration>
  194. </plugin>
  195. <plugin>
  196. <groupId>org.apache.maven.plugins</groupId>
  197. <artifactId>maven-surefire-plugin</artifactId>
  198. <configuration>
  199. <properties>
  200. <property>
  201. <name>listener</name>
  202. <value>org.apache.hadoop.test.TimedOutTestsListener</value>
  203. </property>
  204. </properties>
  205. </configuration>
  206. </plugin>
  207. </plugins>
  208. </build>
  209. <profiles>
  210. <profile>
  211. <id>dist</id>
  212. <activation>
  213. <activeByDefault>false</activeByDefault>
  214. </activation>
  215. <build>
  216. <plugins>
  217. <plugin>
  218. <artifactId>maven-source-plugin</artifactId>
  219. <executions>
  220. <execution>
  221. <id>attach-sources</id>
  222. <goals>
  223. <!-- avoid warning about recursion -->
  224. <goal>jar-no-fork</goal>
  225. </goals>
  226. </execution>
  227. </executions>
  228. </plugin>
  229. <plugin>
  230. <groupId>org.apache.maven.plugins</groupId>
  231. <artifactId>maven-antrun-plugin</artifactId>
  232. <executions>
  233. <execution>
  234. <id>dist</id>
  235. <phase>prepare-package</phase>
  236. <goals>
  237. <goal>run</goal>
  238. </goals>
  239. <configuration>
  240. <target>
  241. <echo file="${project.build.directory}/dist-copynativelibs.sh">
  242. LIB_DIR="${mr.basedir}/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/target/native/target/usr/local/lib"
  243. if [ -d $${LIB_DIR} ] ; then
  244. TARGET_DIR="${project.build.directory}/${project.artifactId}-${project.version}/lib/native"
  245. mkdir -p $${TARGET_DIR}
  246. cp -R $${LIB_DIR}/lib* $${TARGET_DIR}
  247. fi
  248. </echo>
  249. <exec executable="${shell-executable}" dir="${project.build.directory}" failonerror="true">
  250. <arg line="./dist-copynativelibs.sh"/>
  251. </exec>
  252. </target>
  253. </configuration>
  254. </execution>
  255. </executions>
  256. </plugin>
  257. <plugin>
  258. <groupId>org.apache.maven.plugins</groupId>
  259. <artifactId>maven-assembly-plugin</artifactId>
  260. <dependencies>
  261. <dependency>
  262. <groupId>org.apache.hadoop</groupId>
  263. <artifactId>hadoop-assemblies</artifactId>
  264. <version>${project.version}</version>
  265. </dependency>
  266. </dependencies>
  267. <configuration>
  268. <tarLongFileMode>gnu</tarLongFileMode>
  269. <appendAssemblyId>false</appendAssemblyId>
  270. <attach>false</attach>
  271. <finalName>${project.artifactId}-${project.version}</finalName>
  272. <descriptorRefs>
  273. <descriptorRef>hadoop-mapreduce-dist</descriptorRef>
  274. </descriptorRefs>
  275. </configuration>
  276. <executions>
  277. <execution>
  278. <id>package-mapreduce</id>
  279. <phase>prepare-package</phase>
  280. <goals>
  281. <goal>single</goal>
  282. </goals>
  283. </execution>
  284. </executions>
  285. </plugin>
  286. </plugins>
  287. </build>
  288. </profile>
  289. </profiles>
  290. <reporting>
  291. <plugins>
  292. <plugin>
  293. <groupId>com.github.spotbugs</groupId>
  294. <artifactId>spotbugs-maven-plugin</artifactId>
  295. <configuration>
  296. <xmlOutput>true</xmlOutput>
  297. </configuration>
  298. </plugin>
  299. </plugins>
  300. </reporting>
  301. </project>