pom.xml 17 KB

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