pom.xml 18 KB

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