pom.xml 18 KB

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