pom.xml 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309
  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.3.3</version>
  19. <relativePath>../hadoop-project</relativePath>
  20. </parent>
  21. <artifactId>hadoop-mapreduce</artifactId>
  22. <version>3.3.3</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. </exclusions>
  72. </dependency>
  73. <dependency>
  74. <groupId>org.apache.hadoop</groupId>
  75. <artifactId>hadoop-common</artifactId>
  76. <scope>provided</scope>
  77. </dependency>
  78. <dependency>
  79. <groupId>org.slf4j</groupId>
  80. <artifactId>slf4j-api</artifactId>
  81. </dependency>
  82. <dependency>
  83. <groupId>org.slf4j</groupId>
  84. <artifactId>slf4j-reload4j</artifactId>
  85. </dependency>
  86. <dependency>
  87. <groupId>org.apache.hadoop</groupId>
  88. <artifactId>hadoop-annotations</artifactId>
  89. </dependency>
  90. <dependency>
  91. <groupId>org.mockito</groupId>
  92. <artifactId>mockito-core</artifactId>
  93. <scope>test</scope>
  94. </dependency>
  95. <dependency>
  96. <groupId>org.apache.hadoop</groupId>
  97. <artifactId>hadoop-common</artifactId>
  98. <type>test-jar</type>
  99. <scope>test</scope>
  100. </dependency>
  101. <dependency>
  102. <groupId>org.apache.hadoop</groupId>
  103. <artifactId>hadoop-hdfs</artifactId>
  104. <scope>test</scope>
  105. </dependency>
  106. <dependency>
  107. <groupId>com.google.inject</groupId>
  108. <artifactId>guice</artifactId>
  109. </dependency>
  110. <dependency>
  111. <groupId>com.sun.jersey</groupId>
  112. <artifactId>jersey-server</artifactId>
  113. </dependency>
  114. <dependency>
  115. <groupId>com.sun.jersey.contribs</groupId>
  116. <artifactId>jersey-guice</artifactId>
  117. </dependency>
  118. <dependency>
  119. <groupId>com.google.inject.extensions</groupId>
  120. <artifactId>guice-servlet</artifactId>
  121. </dependency>
  122. <dependency>
  123. <groupId>junit</groupId>
  124. <artifactId>junit</artifactId>
  125. </dependency>
  126. <dependency>
  127. <groupId>io.netty</groupId>
  128. <artifactId>netty</artifactId>
  129. </dependency>
  130. <dependency>
  131. <groupId>commons-io</groupId>
  132. <artifactId>commons-io</artifactId>
  133. </dependency>
  134. <dependency>
  135. <groupId>org.hsqldb</groupId>
  136. <artifactId>hsqldb</artifactId>
  137. <scope>compile</scope>
  138. </dependency>
  139. <dependency>
  140. <groupId>${leveldbjni.group}</groupId>
  141. <artifactId>leveldbjni-all</artifactId>
  142. </dependency>
  143. </dependencies>
  144. <build>
  145. <plugins>
  146. <plugin>
  147. <artifactId>maven-antrun-plugin</artifactId>
  148. <executions>
  149. <execution>
  150. <id>tar</id>
  151. <phase>package</phase>
  152. <goals>
  153. <goal>run</goal>
  154. </goals>
  155. <configuration>
  156. <!-- this is identical from hadoop-project-dist, eventually they must be unified -->
  157. <target if="tar">
  158. <!-- Using Unix script to preserve symlinks -->
  159. <echo file="${project.build.directory}/dist-maketar.sh">
  160. cd "${project.build.directory}"
  161. tar cf - ${project.artifactId}-${project.version} | gzip > ${project.artifactId}-${project.version}.tar.gz
  162. </echo>
  163. <exec executable="${shell-executable}" dir="${project.build.directory}" failonerror="true">
  164. <arg line="./dist-maketar.sh"/>
  165. </exec>
  166. </target>
  167. </configuration>
  168. </execution>
  169. </executions>
  170. </plugin>
  171. <plugin>
  172. <groupId>com.github.spotbugs</groupId>
  173. <artifactId>spotbugs-maven-plugin</artifactId>
  174. <configuration>
  175. <xmlOutput>true</xmlOutput>
  176. <excludeFilterFile>${mr.basedir}/dev-support/findbugs-exclude.xml</excludeFilterFile>
  177. <effort>Max</effort>
  178. </configuration>
  179. </plugin>
  180. <plugin>
  181. <groupId>org.apache.rat</groupId>
  182. <artifactId>apache-rat-plugin</artifactId>
  183. <configuration>
  184. <excludes>
  185. <exclude>.eclipse.templates/</exclude>
  186. <exclude>lib/jdiff/**</exclude>
  187. <exclude>dev-support/jdiff/**</exclude>
  188. </excludes>
  189. </configuration>
  190. </plugin>
  191. <plugin>
  192. <groupId>org.apache.maven.plugins</groupId>
  193. <artifactId>maven-surefire-plugin</artifactId>
  194. <configuration>
  195. <properties>
  196. <property>
  197. <name>listener</name>
  198. <value>org.apache.hadoop.test.TimedOutTestsListener</value>
  199. </property>
  200. </properties>
  201. </configuration>
  202. </plugin>
  203. </plugins>
  204. </build>
  205. <profiles>
  206. <profile>
  207. <id>dist</id>
  208. <activation>
  209. <activeByDefault>false</activeByDefault>
  210. </activation>
  211. <build>
  212. <plugins>
  213. <plugin>
  214. <artifactId>maven-source-plugin</artifactId>
  215. <executions>
  216. <execution>
  217. <id>attach-sources</id>
  218. <goals>
  219. <!-- avoid warning about recursion -->
  220. <goal>jar-no-fork</goal>
  221. </goals>
  222. </execution>
  223. </executions>
  224. </plugin>
  225. <plugin>
  226. <groupId>org.apache.maven.plugins</groupId>
  227. <artifactId>maven-antrun-plugin</artifactId>
  228. <executions>
  229. <execution>
  230. <id>dist</id>
  231. <phase>prepare-package</phase>
  232. <goals>
  233. <goal>run</goal>
  234. </goals>
  235. <configuration>
  236. <target>
  237. <echo file="${project.build.directory}/dist-copynativelibs.sh">
  238. LIB_DIR="${mr.basedir}/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/target/native/target/usr/local/lib"
  239. if [ -d $${LIB_DIR} ] ; then
  240. TARGET_DIR="${project.build.directory}/${project.artifactId}-${project.version}/lib/native"
  241. mkdir -p $${TARGET_DIR}
  242. cp -R $${LIB_DIR}/lib* $${TARGET_DIR}
  243. fi
  244. </echo>
  245. <exec executable="${shell-executable}" dir="${project.build.directory}" failonerror="true">
  246. <arg line="./dist-copynativelibs.sh"/>
  247. </exec>
  248. </target>
  249. </configuration>
  250. </execution>
  251. </executions>
  252. </plugin>
  253. <plugin>
  254. <groupId>org.apache.maven.plugins</groupId>
  255. <artifactId>maven-assembly-plugin</artifactId>
  256. <dependencies>
  257. <dependency>
  258. <groupId>org.apache.hadoop</groupId>
  259. <artifactId>hadoop-assemblies</artifactId>
  260. <version>${project.version}</version>
  261. </dependency>
  262. </dependencies>
  263. <configuration>
  264. <tarLongFileMode>gnu</tarLongFileMode>
  265. <appendAssemblyId>false</appendAssemblyId>
  266. <attach>false</attach>
  267. <finalName>${project.artifactId}-${project.version}</finalName>
  268. <descriptorRefs>
  269. <descriptorRef>hadoop-mapreduce-dist</descriptorRef>
  270. </descriptorRefs>
  271. </configuration>
  272. <executions>
  273. <execution>
  274. <id>package-mapreduce</id>
  275. <phase>prepare-package</phase>
  276. <goals>
  277. <goal>single</goal>
  278. </goals>
  279. </execution>
  280. </executions>
  281. </plugin>
  282. </plugins>
  283. </build>
  284. </profile>
  285. </profiles>
  286. <reporting>
  287. <plugins>
  288. <plugin>
  289. <groupId>com.github.spotbugs</groupId>
  290. <artifactId>spotbugs-maven-plugin</artifactId>
  291. <configuration>
  292. <xmlOutput>true</xmlOutput>
  293. </configuration>
  294. </plugin>
  295. </plugins>
  296. </reporting>
  297. </project>