pom.xml 17 KB

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