pom.xml 17 KB

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