pom.xml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357
  1. <?xml version="1.0"?>
  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. https://maven.apache.org/xsd/maven-4.0.0.xsd">
  17. <modelVersion>4.0.0</modelVersion>
  18. <parent>
  19. <groupId>org.apache.hadoop</groupId>
  20. <artifactId>hadoop-project</artifactId>
  21. <version>3.4.0-SNAPSHOT</version>
  22. <relativePath>../../hadoop-project</relativePath>
  23. </parent>
  24. <artifactId>hadoop-mapreduce-client</artifactId>
  25. <version>3.4.0-SNAPSHOT</version>
  26. <name>Apache Hadoop MapReduce Client</name>
  27. <packaging>pom</packaging>
  28. <properties>
  29. <hadoop.common.build.dir>${basedir}/../../../hadoop-common-project/hadoop-common/target</hadoop.common.build.dir>
  30. <!-- Used by jdiff -->
  31. <!-- Antrun cannot resolve yarn.basedir, so we need to setup something else -->
  32. <dev-support.relative.dir>../dev-support</dev-support.relative.dir>
  33. </properties>
  34. <dependencies>
  35. <dependency>
  36. <groupId>com.google.protobuf</groupId>
  37. <artifactId>protobuf-java</artifactId>
  38. </dependency>
  39. <dependency>
  40. <groupId>org.apache.avro</groupId>
  41. <artifactId>avro</artifactId>
  42. <exclusions>
  43. <exclusion>
  44. <groupId>org.eclipse.jetty</groupId>
  45. <artifactId>jetty-server</artifactId>
  46. </exclusion>
  47. <exclusion>
  48. <groupId>org.apache.ant</groupId>
  49. <artifactId>ant</artifactId>
  50. </exclusion>
  51. <exclusion>
  52. <groupId>org.jboss.netty</groupId>
  53. <artifactId>netty</artifactId>
  54. </exclusion>
  55. <exclusion>
  56. <groupId>org.apache.velocity</groupId>
  57. <artifactId>velocity</artifactId>
  58. </exclusion>
  59. <exclusion>
  60. <groupId>org.slf4j</groupId>
  61. <artifactId>slf4j-api</artifactId>
  62. </exclusion>
  63. <exclusion>
  64. <artifactId>paranamer-ant</artifactId>
  65. <groupId>com.thoughtworks.paranamer</groupId>
  66. </exclusion>
  67. </exclusions>
  68. </dependency>
  69. <dependency>
  70. <groupId>org.apache.hadoop</groupId>
  71. <artifactId>hadoop-common</artifactId>
  72. <scope>provided</scope>
  73. </dependency>
  74. <dependency>
  75. <groupId>org.slf4j</groupId>
  76. <artifactId>slf4j-api</artifactId>
  77. </dependency>
  78. <dependency>
  79. <groupId>org.slf4j</groupId>
  80. <artifactId>slf4j-log4j12</artifactId>
  81. </dependency>
  82. <dependency>
  83. <groupId>org.apache.hadoop</groupId>
  84. <artifactId>hadoop-annotations</artifactId>
  85. </dependency>
  86. <dependency>
  87. <groupId>org.mockito</groupId>
  88. <artifactId>mockito-core</artifactId>
  89. <scope>test</scope>
  90. </dependency>
  91. <dependency>
  92. <groupId>org.apache.hadoop</groupId>
  93. <artifactId>hadoop-common</artifactId>
  94. <type>test-jar</type>
  95. <scope>test</scope>
  96. </dependency>
  97. <dependency>
  98. <groupId>org.apache.hadoop</groupId>
  99. <artifactId>hadoop-hdfs</artifactId>
  100. <scope>test</scope>
  101. </dependency>
  102. <dependency>
  103. <groupId>org.apache.hadoop</groupId>
  104. <artifactId>hadoop-hdfs-client</artifactId>
  105. <scope>test</scope>
  106. </dependency>
  107. <dependency>
  108. <groupId>com.google.inject.extensions</groupId>
  109. <artifactId>guice-servlet</artifactId>
  110. </dependency>
  111. <dependency>
  112. <groupId>junit</groupId>
  113. <artifactId>junit</artifactId>
  114. <scope>test</scope>
  115. </dependency>
  116. <dependency>
  117. <groupId>io.netty</groupId>
  118. <artifactId>netty</artifactId>
  119. </dependency>
  120. <dependency>
  121. <groupId>commons-logging</groupId>
  122. <artifactId>commons-logging</artifactId>
  123. <scope>provided</scope>
  124. </dependency>
  125. <dependency>
  126. <groupId>org.apache.hadoop.thirdparty</groupId>
  127. <artifactId>hadoop-shaded-guava</artifactId>
  128. <scope>provided</scope>
  129. </dependency>
  130. <dependency>
  131. <groupId>commons-codec</groupId>
  132. <artifactId>commons-codec</artifactId>
  133. <scope>provided</scope>
  134. </dependency>
  135. <dependency>
  136. <groupId>commons-cli</groupId>
  137. <artifactId>commons-cli</artifactId>
  138. <scope>provided</scope>
  139. </dependency>
  140. <dependency>
  141. <groupId>commons-collections</groupId>
  142. <artifactId>commons-collections</artifactId>
  143. <scope>provided</scope>
  144. </dependency>
  145. <dependency>
  146. <groupId>com.sun.jersey.jersey-test-framework</groupId>
  147. <artifactId>jersey-test-framework-grizzly2</artifactId>
  148. <scope>test</scope>
  149. </dependency>
  150. </dependencies>
  151. <build>
  152. <plugins>
  153. <plugin>
  154. <groupId>com.github.spotbugs</groupId>
  155. <artifactId>spotbugs-maven-plugin</artifactId>
  156. <configuration>
  157. <xmlOutput>true</xmlOutput>
  158. <excludeFilterFile>${mr.basedir}/dev-support/findbugs-exclude.xml</excludeFilterFile>
  159. <effort>Max</effort>
  160. </configuration>
  161. </plugin>
  162. <plugin>
  163. <groupId>org.apache.maven.plugins</groupId>
  164. <artifactId>maven-surefire-plugin</artifactId>
  165. <configuration>
  166. <properties>
  167. <property>
  168. <name>listener</name>
  169. <value>org.apache.hadoop.test.TimedOutTestsListener</value>
  170. </property>
  171. </properties>
  172. </configuration>
  173. </plugin>
  174. <plugin>
  175. <groupId>org.apache.maven.plugins</groupId>
  176. <artifactId>maven-enforcer-plugin</artifactId>
  177. <dependencies>
  178. <dependency>
  179. <groupId>de.skuzzle.enforcer</groupId>
  180. <artifactId>restrict-imports-enforcer-rule</artifactId>
  181. <version>${restrict-imports.enforcer.version}</version>
  182. </dependency>
  183. </dependencies>
  184. <executions>
  185. <execution>
  186. <id>banned-illegal-imports</id>
  187. <phase>process-sources</phase>
  188. <goals>
  189. <goal>enforce</goal>
  190. </goals>
  191. <configuration>
  192. <rules>
  193. <restrictImports implementation="de.skuzzle.enforcer.restrictimports.rule.RestrictImports">
  194. <includeTestCode>true</includeTestCode>
  195. <reason>Use hadoop-common provided VisibleForTesting rather than the one provided by Guava</reason>
  196. <bannedImports>
  197. <bannedImport>org.apache.hadoop.thirdparty.com.google.common.annotations.VisibleForTesting</bannedImport>
  198. <bannedImport>com.google.common.annotations.VisibleForTesting</bannedImport>
  199. </bannedImports>
  200. </restrictImports>
  201. </rules>
  202. </configuration>
  203. </execution>
  204. </executions>
  205. </plugin>
  206. </plugins>
  207. </build>
  208. <profiles>
  209. <profile>
  210. <id>docs</id>
  211. <activation>
  212. <activeByDefault>false</activeByDefault>
  213. </activation>
  214. <properties>
  215. <jdiff.stable.api>2.7.2</jdiff.stable.api>
  216. <jdiff.stability>-unstable</jdiff.stability>
  217. <jdiff.javadoc.maxmemory>512m</jdiff.javadoc.maxmemory>
  218. </properties>
  219. <dependencies>
  220. <dependency>
  221. <groupId>xerces</groupId>
  222. <artifactId>xercesImpl</artifactId>
  223. <version>${xerces.jdiff.version}</version>
  224. </dependency>
  225. </dependencies>
  226. <build>
  227. <plugins>
  228. <plugin>
  229. <groupId>org.apache.maven.plugins</groupId>
  230. <artifactId>maven-javadoc-plugin</artifactId>
  231. <executions>
  232. <execution>
  233. <goals>
  234. <goal>javadoc-no-fork</goal>
  235. </goals>
  236. <phase>prepare-package</phase>
  237. </execution>
  238. </executions>
  239. </plugin>
  240. <plugin>
  241. <groupId>org.apache.maven.plugins</groupId>
  242. <artifactId>maven-dependency-plugin</artifactId>
  243. <executions>
  244. <execution>
  245. <id>site</id>
  246. <phase>prepare-package</phase>
  247. <goals>
  248. <goal>copy</goal>
  249. </goals>
  250. <configuration>
  251. <artifactItems>
  252. <artifactItem>
  253. <groupId>jdiff</groupId>
  254. <artifactId>jdiff</artifactId>
  255. <version>${jdiff.version}</version>
  256. <overWrite>false</overWrite>
  257. <outputDirectory>${project.build.directory}</outputDirectory>
  258. <destFileName>jdiff.jar</destFileName>
  259. </artifactItem>
  260. <artifactItem>
  261. <groupId>org.apache.hadoop</groupId>
  262. <artifactId>hadoop-annotations</artifactId>
  263. <version>${project.version}</version>
  264. <overWrite>false</overWrite>
  265. <outputDirectory>${project.build.directory}</outputDirectory>
  266. <destFileName>hadoop-annotations.jar</destFileName>
  267. </artifactItem>
  268. <artifactItem>
  269. <groupId>xerces</groupId>
  270. <artifactId>xercesImpl</artifactId>
  271. <version>${xerces.version.jdiff}</version>
  272. <overWrite>false</overWrite>
  273. <outputDirectory>${project.build.directory}</outputDirectory>
  274. <destFileName>xerces.jar</destFileName>
  275. </artifactItem>
  276. </artifactItems>
  277. </configuration>
  278. </execution>
  279. </executions>
  280. </plugin>
  281. <plugin>
  282. <groupId>org.apache.maven.plugins</groupId>
  283. <artifactId>maven-antrun-plugin</artifactId>
  284. <executions>
  285. <execution>
  286. <id>site</id>
  287. <phase>prepare-package</phase>
  288. <goals>
  289. <goal>run</goal>
  290. </goals>
  291. <configuration>
  292. <target if="should.run.jdiff">
  293. <!-- Jdiff -->
  294. <mkdir dir="${project.build.directory}/site/jdiff/xml"/>
  295. <javadoc maxmemory="${jdiff.javadoc.maxmemory}" verbose="yes">
  296. <doclet name="org.apache.hadoop.classification.tools.IncludePublicAnnotationsJDiffDoclet"
  297. path="${project.build.directory}/hadoop-annotations.jar:${project.build.directory}/jdiff.jar">
  298. <param name="-apidir" value="${project.build.directory}/site/jdiff/xml"/>
  299. <param name="-apiname" value="${project.name} ${project.version}"/>
  300. <param name="${jdiff.stability}"/>
  301. </doclet>
  302. <packageset dir="${basedir}/src/main/java"/>
  303. <classpath>
  304. <path refid="maven.compile.classpath"/>
  305. </classpath>
  306. </javadoc>
  307. <javadoc sourcepath="${basedir}/src/main/java"
  308. destdir="${project.build.directory}/site/jdiff/xml"
  309. sourceFiles="${dev-support.relative.dir}/jdiff/Null.java"
  310. maxmemory="${jdiff.javadoc.maxmemory}">
  311. <doclet name="org.apache.hadoop.classification.tools.IncludePublicAnnotationsJDiffDoclet"
  312. path="${project.build.directory}/hadoop-annotations.jar:${project.build.directory}/jdiff.jar:${project.build.directory}/xerces.jar">
  313. <param name="-oldapi" value="${project.name} ${jdiff.stable.api}"/>
  314. <param name="-newapi" value="${project.name} ${project.version}"/>
  315. <param name="-oldapidir" value="${basedir}/${dev-support.relative.dir}/jdiff"/>
  316. <param name="-newapidir" value="${project.build.directory}/site/jdiff/xml"/>
  317. <param name="-javadocold"
  318. value="https://hadoop.apache.org/docs/r${jdiff.stable.api}/api/"/>
  319. <param name="-javadocnew" value="${project.build.directory}/site/api/"/>
  320. <param name="-stats"/>
  321. <param name="${jdiff.stability}"/>
  322. </doclet>
  323. <classpath>
  324. <path refid="maven.compile.classpath"/>
  325. </classpath>
  326. </javadoc>
  327. <property name="compile_classpath" refid="maven.compile.classpath"/>
  328. </target>
  329. </configuration>
  330. </execution>
  331. </executions>
  332. </plugin>
  333. </plugins>
  334. </build>
  335. </profile>
  336. </profiles>
  337. <modules>
  338. <module>hadoop-mapreduce-client-core</module>
  339. <module>hadoop-mapreduce-client-common</module>
  340. <module>hadoop-mapreduce-client-shuffle</module>
  341. <module>hadoop-mapreduce-client-app</module>
  342. <module>hadoop-mapreduce-client-jobclient</module>
  343. <module>hadoop-mapreduce-client-hs</module>
  344. <module>hadoop-mapreduce-client-hs-plugins</module>
  345. <module>hadoop-mapreduce-client-nativetask</module>
  346. <module>hadoop-mapreduce-client-uploader</module>
  347. </modules>
  348. </project>