pom.xml 17 KB

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