pom.xml 18 KB

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