pom.xml 17 KB

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