pom.xml 17 KB

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