pom.xml 18 KB

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