pom.xml 18 KB

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