pom.xml 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434
  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. 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-project-dist</artifactId>
  25. <version>3.4.0-SNAPSHOT</version>
  26. <description>Apache Hadoop Project Dist POM</description>
  27. <name>Apache Hadoop Project Dist POM</name>
  28. <packaging>pom</packaging>
  29. <properties>
  30. <hadoop.tmp.dir>${project.build.directory}/test</hadoop.tmp.dir>
  31. <test.build.data>${project.build.directory}/test/data</test.build.data>
  32. <hadoop.log.dir>${project.build.directory}/log</hadoop.log.dir>
  33. <test.build.webapps>${project.build.directory}/test-classes/webapps</test.build.webapps>
  34. <test.cache.data>${project.build.directory}/test-classes</test.cache.data>
  35. <test.build.classes>${project.build.directory}/test-classes</test.build.classes>
  36. <hadoop.component>UNDEF</hadoop.component>
  37. <snappy.lib></snappy.lib>
  38. <bundle.snappy>false</bundle.snappy>
  39. <zstd.lib></zstd.lib>
  40. <bundle.zstd>false</bundle.zstd>
  41. <bundle.zstd.in.bin>false</bundle.zstd.in.bin>
  42. <isal.lib></isal.lib>
  43. <bundle.isal>false</bundle.isal>
  44. <openssl.lib></openssl.lib>
  45. <bundle.openssl>false</bundle.openssl>
  46. <bundle.openssl.in.bin>false</bundle.openssl.in.bin>
  47. </properties>
  48. <dependencies>
  49. <dependency>
  50. <groupId>org.apache.hadoop</groupId>
  51. <artifactId>hadoop-annotations</artifactId>
  52. <scope>provided</scope>
  53. </dependency>
  54. </dependencies>
  55. <build>
  56. <plugins>
  57. <plugin>
  58. <groupId>org.apache.maven.plugins</groupId>
  59. <artifactId>maven-jar-plugin</artifactId>
  60. <executions>
  61. <execution>
  62. <id>prepare-jar</id>
  63. <phase>prepare-package</phase>
  64. <goals>
  65. <goal>jar</goal>
  66. </goals>
  67. </execution>
  68. <execution>
  69. <id>prepare-test-jar</id>
  70. <phase>prepare-package</phase>
  71. <goals>
  72. <goal>test-jar</goal>
  73. </goals>
  74. <configuration>
  75. <includes>
  76. <include>**/*.class</include>
  77. <include>webapps/**</include>
  78. <include>META-INF/LICENSE.txt</include>
  79. <include>META-INF/NOTICE.txt</include>
  80. </includes>
  81. </configuration>
  82. </execution>
  83. </executions>
  84. </plugin>
  85. <plugin>
  86. <groupId>com.github.spotbugs</groupId>
  87. <artifactId>spotbugs-maven-plugin</artifactId>
  88. <configuration>
  89. <excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml</excludeFilterFile>
  90. <maxHeap>2048</maxHeap>
  91. </configuration>
  92. </plugin>
  93. <plugin>
  94. <groupId>org.apache.maven.plugins</groupId>
  95. <artifactId>maven-javadoc-plugin</artifactId>
  96. <configuration>
  97. <maxmemory>768m</maxmemory>
  98. <quiet>true</quiet>
  99. <verbose>false</verbose>
  100. <source>${maven.compile.source}</source>
  101. <charset>${maven.compile.encoding}</charset>
  102. <reportOutputDirectory>${project.build.directory}/site</reportOutputDirectory>
  103. <destDir>${project.build.directory}/api</destDir>
  104. <groups>
  105. <group>
  106. <title>${project.name} API</title>
  107. <packages>org.apache.hadoop*</packages>
  108. </group>
  109. </groups>
  110. <!-- switch on dependency-driven aggregation -->
  111. <includeDependencySources>false</includeDependencySources>
  112. <dependencySourceIncludes>
  113. <!-- include ONLY dependencies I control -->
  114. <dependencySourceInclude>org.apache.hadoop:hadoop-annotations</dependencySourceInclude>
  115. </dependencySourceIncludes>
  116. </configuration>
  117. </plugin>
  118. </plugins>
  119. </build>
  120. <profiles>
  121. <profile>
  122. <id>docs</id>
  123. <activation>
  124. <activeByDefault>false</activeByDefault>
  125. </activation>
  126. <properties>
  127. <jdiff.stable.api>3.3.1</jdiff.stable.api>
  128. <jdiff.stability>-unstable</jdiff.stability>
  129. <!-- Commented out for HADOOP-11776 -->
  130. <!-- Uncomment param name="${jdiff.compatibility}" in javadoc doclet if compatibility is not empty -->
  131. <jdiff.compatibility></jdiff.compatibility>
  132. <jdiff.javadoc.maxmemory>512m</jdiff.javadoc.maxmemory>
  133. </properties>
  134. <dependencies>
  135. <dependency>
  136. <groupId>xerces</groupId>
  137. <artifactId>xercesImpl</artifactId>
  138. <version>${xerces.jdiff.version}</version>
  139. </dependency>
  140. </dependencies>
  141. <build>
  142. <plugins>
  143. <plugin>
  144. <groupId>org.apache.maven.plugins</groupId>
  145. <artifactId>maven-javadoc-plugin</artifactId>
  146. <executions>
  147. <execution>
  148. <goals>
  149. <goal>javadoc-no-fork</goal>
  150. </goals>
  151. <phase>prepare-package</phase>
  152. </execution>
  153. </executions>
  154. </plugin>
  155. <plugin>
  156. <groupId>org.apache.maven.plugins</groupId>
  157. <artifactId>maven-dependency-plugin</artifactId>
  158. <executions>
  159. <execution>
  160. <id>site</id>
  161. <phase>prepare-package</phase>
  162. <goals>
  163. <goal>copy</goal>
  164. </goals>
  165. <configuration>
  166. <artifactItems>
  167. <artifactItem>
  168. <groupId>jdiff</groupId>
  169. <artifactId>jdiff</artifactId>
  170. <version>${jdiff.version}</version>
  171. <overWrite>false</overWrite>
  172. <outputDirectory>${project.build.directory}</outputDirectory>
  173. <destFileName>jdiff.jar</destFileName>
  174. </artifactItem>
  175. <artifactItem>
  176. <groupId>org.apache.hadoop</groupId>
  177. <artifactId>hadoop-annotations</artifactId>
  178. <version>${project.version}</version>
  179. <overWrite>false</overWrite>
  180. <outputDirectory>${project.build.directory}</outputDirectory>
  181. <destFileName>hadoop-annotations.jar</destFileName>
  182. </artifactItem>
  183. <artifactItem>
  184. <groupId>xerces</groupId>
  185. <artifactId>xercesImpl</artifactId>
  186. <version>${xerces.jdiff.version}</version>
  187. <overWrite>false</overWrite>
  188. <outputDirectory>${project.build.directory}</outputDirectory>
  189. <destFileName>xerces.jar</destFileName>
  190. </artifactItem>
  191. </artifactItems>
  192. </configuration>
  193. </execution>
  194. </executions>
  195. </plugin>
  196. <plugin>
  197. <groupId>org.apache.maven.plugins</groupId>
  198. <artifactId>maven-antrun-plugin</artifactId>
  199. <executions>
  200. <!-- Pre site -->
  201. <execution>
  202. <id>pre-site</id>
  203. <phase>prepare-package</phase>
  204. <goals>
  205. <goal>run</goal>
  206. </goals>
  207. <configuration>
  208. <target if="is.hadoop.common.component">
  209. <!-- HADOOP-13428: This is for workaround issues of JDiff
  210. - https://sourceforge.net/p/javadiff/bugs/19/ -->
  211. <exec executable="patch" input="dev-support/jdiff-workaround.patch" dir="${basedir}">
  212. <arg value="-p3"/>
  213. </exec>
  214. </target>
  215. </configuration>
  216. </execution>
  217. <execution>
  218. <id>site</id>
  219. <phase>prepare-package</phase>
  220. <goals>
  221. <goal>run</goal>
  222. </goals>
  223. <configuration>
  224. <target if="is.hadoop.component">
  225. <mkdir dir="${project.build.directory}/docs-src"/>
  226. <!-- Docs -->
  227. <style basedir="${basedir}/src/main/resources"
  228. destdir="${project.build.directory}/site"
  229. includes="core-default.xml"
  230. style="${basedir}/src/main/xsl/configuration.xsl"/>
  231. <!-- Jdiff -->
  232. <mkdir dir="${project.build.directory}/site/jdiff/xml"/>
  233. <javadoc maxmemory="${jdiff.javadoc.maxmemory}" verbose="yes">
  234. <doclet name="org.apache.hadoop.classification.tools.IncludePublicAnnotationsJDiffDoclet"
  235. path="${project.build.directory}/hadoop-annotations.jar:${project.build.directory}/jdiff.jar">
  236. <param name="-apidir" value="${project.build.directory}/site/jdiff/xml"/>
  237. <param name="-apiname" value="${project.name} ${project.version}"/>
  238. <param name="${jdiff.stability}"/>
  239. </doclet>
  240. <packageset dir="${basedir}/src/main/java"/>
  241. <classpath>
  242. <path refid="maven.compile.classpath"/>
  243. </classpath>
  244. </javadoc>
  245. <javadoc sourcepath="${basedir}/src/main/java"
  246. destdir="${project.build.directory}/site/jdiff/xml"
  247. sourceFiles="${basedir}/dev-support/jdiff/Null.java"
  248. maxmemory="${jdiff.javadoc.maxmemory}">
  249. <doclet name="org.apache.hadoop.classification.tools.IncludePublicAnnotationsJDiffDoclet"
  250. path="${project.build.directory}/hadoop-annotations.jar:${project.build.directory}/jdiff.jar:${project.build.directory}/xerces.jar">
  251. <param name="-oldapi" value="${project.name} ${jdiff.stable.api}"/>
  252. <param name="-newapi" value="${project.name} ${project.version}"/>
  253. <param name="-oldapidir" value="${basedir}/dev-support/jdiff"/>
  254. <param name="-newapidir" value="${project.build.directory}/site/jdiff/xml"/>
  255. <param name="-javadocold"
  256. value="https://hadoop.apache.org/docs/r${jdiff.stable.api}/api/"/>
  257. <param name="-javadocnew" value="${project.build.directory}/site/api"/>
  258. <param name="-stats"/>
  259. <param name="${jdiff.stability}"/>
  260. <!--param name="${jdiff.compatibility}"/-->
  261. </doclet>
  262. <classpath>
  263. <path refid="maven.compile.classpath"/>
  264. </classpath>
  265. </javadoc>
  266. </target>
  267. </configuration>
  268. </execution>
  269. <!-- post site phase -->
  270. <execution>
  271. <id>post-site</id>
  272. <phase>prepare-package</phase>
  273. <goals>
  274. <goal>run</goal>
  275. </goals>
  276. <configuration>
  277. <target if="is.hadoop.common.component">
  278. <!-- HADOOP-13428: Revert temporary patch-->
  279. <exec executable="patch" input="dev-support/jdiff-workaround.patch" dir="${basedir}">
  280. <arg value="-p3"/>
  281. <arg value="-R"/>
  282. </exec>
  283. </target>
  284. </configuration>
  285. </execution>
  286. </executions>
  287. </plugin>
  288. </plugins>
  289. </build>
  290. </profile>
  291. <profile>
  292. <id>dist</id>
  293. <activation>
  294. <activeByDefault>false</activeByDefault>
  295. </activation>
  296. <build>
  297. <plugins>
  298. <plugin>
  299. <groupId>org.codehaus.mojo</groupId>
  300. <artifactId>exec-maven-plugin</artifactId>
  301. <version>${exec-maven-plugin.version}</version>
  302. <executions>
  303. <execution>
  304. <id>pre-dist</id>
  305. <phase>prepare-package</phase>
  306. <goals>
  307. <goal>exec</goal>
  308. </goals>
  309. <configuration>
  310. <executable>${shell-executable}</executable>
  311. <workingDirectory>${project.build.directory}</workingDirectory>
  312. <requiresOnline>false</requiresOnline>
  313. <arguments>
  314. <argument>${project.parent.basedir}/../dev-support/bin/dist-copynativelibs</argument>
  315. <argument>--version=${project.version}</argument>
  316. <argument>--builddir=${project.build.directory}</argument>
  317. <argument>--artifactid=${project.artifactId}</argument>
  318. <argument>--isalbundle=${bundle.isal}</argument>
  319. <argument>--isallib=${isal.lib}</argument>
  320. <argument>--openssllib=${openssl.lib}</argument>
  321. <argument>--opensslbinbundle=${bundle.openssl.in.bin}</argument>
  322. <argument>--openssllibbundle=${bundle.openssl}</argument>
  323. <argument>--snappylib=${snappy.lib}</argument>
  324. <argument>--snappylibbundle=${bundle.snappy}</argument>
  325. <argument>--zstdbinbundle=${bundle.zstd.in.bin}</argument>
  326. <argument>--zstdlib=${zstd.lib}</argument>
  327. <argument>--zstdlibbundle=${bundle.zstd}</argument>
  328. </arguments>
  329. </configuration>
  330. </execution>
  331. </executions>
  332. </plugin>
  333. <plugin>
  334. <groupId>org.apache.maven.plugins</groupId>
  335. <artifactId>maven-antrun-plugin</artifactId>
  336. <executions>
  337. <execution>
  338. <id>tar</id>
  339. <phase>package</phase>
  340. <goals>
  341. <goal>run</goal>
  342. </goals>
  343. <configuration>
  344. <target if="tar">
  345. <!-- Using Unix script to preserve symlinks -->
  346. <echo file="${project.build.directory}/dist-maketar.sh">
  347. cd "${project.build.directory}"
  348. tar cf - ${project.artifactId}-${project.version} | gzip > ${project.artifactId}-${project.version}.tar.gz
  349. </echo>
  350. <exec executable="${shell-executable}" dir="${project.build.directory}" failonerror="true">
  351. <arg line="./dist-maketar.sh"/>
  352. </exec>
  353. </target>
  354. </configuration>
  355. </execution>
  356. </executions>
  357. </plugin>
  358. <plugin>
  359. <groupId>org.apache.maven.plugins</groupId>
  360. <artifactId>maven-assembly-plugin</artifactId>
  361. <dependencies>
  362. <dependency>
  363. <groupId>org.apache.hadoop</groupId>
  364. <artifactId>hadoop-assemblies</artifactId>
  365. <version>${hadoop.version}</version>
  366. </dependency>
  367. </dependencies>
  368. <executions>
  369. <execution>
  370. <id>dist</id>
  371. <phase>package</phase>
  372. <goals>
  373. <goal>single</goal>
  374. </goals>
  375. <configuration>
  376. <appendAssemblyId>false</appendAssemblyId>
  377. <attach>false</attach>
  378. <finalName>${project.artifactId}-${project.version}</finalName>
  379. <descriptorRefs>
  380. <descriptorRef>hadoop-dist</descriptorRef>
  381. </descriptorRefs>
  382. </configuration>
  383. </execution>
  384. </executions>
  385. </plugin>
  386. </plugins>
  387. </build>
  388. </profile>
  389. <profile>
  390. <id>doclet</id>
  391. <activation>
  392. <jdk>(,10)</jdk>
  393. </activation>
  394. <build>
  395. <plugins>
  396. <plugin>
  397. <groupId>org.apache.maven.plugins</groupId>
  398. <artifactId>maven-javadoc-plugin</artifactId>
  399. <configuration>
  400. <doclet>org.apache.hadoop.classification.tools.ExcludePrivateAnnotationsStandardDoclet</doclet>
  401. <docletArtifacts>
  402. <docletArtifact>
  403. <groupId>org.apache.hadoop</groupId>
  404. <artifactId>hadoop-annotations</artifactId>
  405. <version>${hadoop.version}</version>
  406. </docletArtifact>
  407. </docletArtifacts>
  408. <useStandardDocletOptions>true</useStandardDocletOptions>
  409. </configuration>
  410. </plugin>
  411. </plugins>
  412. </build>
  413. </profile>
  414. </profiles>
  415. </project>