pom.xml 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404
  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.9.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.9.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. <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.apache.maven.plugins</groupId>
  84. <artifactId>maven-source-plugin</artifactId>
  85. <executions>
  86. <execution>
  87. <phase>prepare-package</phase>
  88. <goals>
  89. <goal>jar</goal>
  90. <goal>test-jar</goal>
  91. </goals>
  92. </execution>
  93. </executions>
  94. <configuration>
  95. <attach>true</attach>
  96. </configuration>
  97. </plugin>
  98. <plugin>
  99. <groupId>org.codehaus.mojo</groupId>
  100. <artifactId>findbugs-maven-plugin</artifactId>
  101. <configuration>
  102. <excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml</excludeFilterFile>
  103. <fork>true</fork>
  104. <maxHeap>2048</maxHeap>
  105. </configuration>
  106. </plugin>
  107. <plugin>
  108. <groupId>org.apache.maven.plugins</groupId>
  109. <artifactId>maven-javadoc-plugin</artifactId>
  110. <configuration>
  111. <linksource>true</linksource>
  112. <maxmemory>512m</maxmemory>
  113. <quiet>true</quiet>
  114. <verbose>false</verbose>
  115. <source>${maven.compile.source}</source>
  116. <charset>${maven.compile.encoding}</charset>
  117. <reportOutputDirectory>${project.build.directory}/site</reportOutputDirectory>
  118. <destDir>api</destDir>
  119. <groups>
  120. <group>
  121. <title>${project.name} API</title>
  122. <packages>org.apache.hadoop*</packages>
  123. </group>
  124. </groups>
  125. <doclet>org.apache.hadoop.classification.tools.ExcludePrivateAnnotationsStandardDoclet</doclet>
  126. <docletArtifacts>
  127. <docletArtifact>
  128. <groupId>org.apache.hadoop</groupId>
  129. <artifactId>hadoop-annotations</artifactId>
  130. <version>${project.version}</version>
  131. </docletArtifact>
  132. </docletArtifacts>
  133. <useStandardDocletOptions>true</useStandardDocletOptions>
  134. <!-- switch on dependency-driven aggregation -->
  135. <includeDependencySources>false</includeDependencySources>
  136. <dependencySourceIncludes>
  137. <!-- include ONLY dependencies I control -->
  138. <dependencySourceInclude>org.apache.hadoop:hadoop-annotations</dependencySourceInclude>
  139. </dependencySourceIncludes>
  140. </configuration>
  141. </plugin>
  142. </plugins>
  143. </build>
  144. <profiles>
  145. <profile>
  146. <id>docs</id>
  147. <activation>
  148. <activeByDefault>false</activeByDefault>
  149. </activation>
  150. <properties>
  151. <jdiff.stable.api>2.6.0</jdiff.stable.api>
  152. <jdiff.stability>-unstable</jdiff.stability>
  153. <!-- Commented out for HADOOP-11776 -->
  154. <!-- Uncomment param name="${jdiff.compatibility}" in javadoc doclet if compatibility is not empty -->
  155. <jdiff.compatibility></jdiff.compatibility>
  156. <jdiff.javadoc.maxmemory>512m</jdiff.javadoc.maxmemory>
  157. </properties>
  158. <build>
  159. <plugins>
  160. <plugin>
  161. <groupId>org.apache.maven.plugins</groupId>
  162. <artifactId>maven-javadoc-plugin</artifactId>
  163. <executions>
  164. <execution>
  165. <goals>
  166. <goal>javadoc</goal>
  167. </goals>
  168. <phase>prepare-package</phase>
  169. </execution>
  170. </executions>
  171. </plugin>
  172. <plugin>
  173. <groupId>org.codehaus.mojo</groupId>
  174. <artifactId>findbugs-maven-plugin</artifactId>
  175. <executions>
  176. <execution>
  177. <goals>
  178. <goal>findbugs</goal>
  179. </goals>
  180. <phase>prepare-package</phase>
  181. </execution>
  182. </executions>
  183. <configuration>
  184. <excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml</excludeFilterFile>
  185. </configuration>
  186. </plugin>
  187. <plugin>
  188. <groupId>org.apache.maven.plugins</groupId>
  189. <artifactId>maven-dependency-plugin</artifactId>
  190. <executions>
  191. <execution>
  192. <id>site</id>
  193. <phase>prepare-package</phase>
  194. <goals>
  195. <goal>copy</goal>
  196. </goals>
  197. <configuration>
  198. <artifactItems>
  199. <artifactItem>
  200. <groupId>jdiff</groupId>
  201. <artifactId>jdiff</artifactId>
  202. <version>${jdiff.version}</version>
  203. <overWrite>false</overWrite>
  204. <outputDirectory>${project.build.directory}</outputDirectory>
  205. <destFileName>jdiff.jar</destFileName>
  206. </artifactItem>
  207. <artifactItem>
  208. <groupId>org.apache.hadoop</groupId>
  209. <artifactId>hadoop-annotations</artifactId>
  210. <version>${project.version}</version>
  211. <overWrite>false</overWrite>
  212. <outputDirectory>${project.build.directory}</outputDirectory>
  213. <destFileName>hadoop-annotations.jar</destFileName>
  214. </artifactItem>
  215. <artifactItem>
  216. <groupId>xerces</groupId>
  217. <artifactId>xercesImpl</artifactId>
  218. <version>${xerces.jdiff.version}</version>
  219. <overWrite>false</overWrite>
  220. <outputDirectory>${project.build.directory}</outputDirectory>
  221. <destFileName>xerces.jar</destFileName>
  222. </artifactItem>
  223. </artifactItems>
  224. </configuration>
  225. </execution>
  226. </executions>
  227. </plugin>
  228. <plugin>
  229. <groupId>org.apache.maven.plugins</groupId>
  230. <artifactId>maven-antrun-plugin</artifactId>
  231. <executions>
  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.ExcludePrivateAnnotationsJDiffDoclet"
  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.ExcludePrivateAnnotationsJDiffDoclet"
  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. </executions>
  288. </plugin>
  289. </plugins>
  290. </build>
  291. </profile>
  292. <profile>
  293. <id>dist</id>
  294. <activation>
  295. <activeByDefault>false</activeByDefault>
  296. </activation>
  297. <build>
  298. <plugins>
  299. <plugin>
  300. <groupId>org.codehaus.mojo</groupId>
  301. <artifactId>exec-maven-plugin</artifactId>
  302. <version>${exec-maven-plugin.version}</version>
  303. <executions>
  304. <execution>
  305. <id>pre-dist</id>
  306. <phase>prepare-package</phase>
  307. <goals>
  308. <goal>exec</goal>
  309. </goals>
  310. <configuration>
  311. <executable>${shell-executable}</executable>
  312. <workingDirectory>${project.build.directory}</workingDirectory>
  313. <requiresOnline>false</requiresOnline>
  314. <arguments>
  315. <argument>${project.parent.basedir}/../dev-support/bin/dist-copynativelibs</argument>
  316. <argument>--version=${project.version}</argument>
  317. <argument>--builddir=${project.build.directory}</argument>
  318. <argument>--artifactid=${project.artifactId}</argument>
  319. <argument>--openssllib=${openssl.lib}</argument>
  320. <argument>--opensslbinbundle=${bundle.openssl.in.bin}</argument>
  321. <argument>--openssllibbundle=${bundle.openssl}</argument>
  322. <argument>--snappybinbundle=${bundle.snappy.in.bin}</argument>
  323. <argument>--snappylib=${snappy.lib}</argument>
  324. <argument>--snappylibbundle=${bundle.snappy}</argument>
  325. </arguments>
  326. </configuration>
  327. </execution>
  328. </executions>
  329. </plugin>
  330. <plugin>
  331. <groupId>org.apache.maven.plugins</groupId>
  332. <artifactId>maven-antrun-plugin</artifactId>
  333. <executions>
  334. <execution>
  335. <id>tar</id>
  336. <phase>package</phase>
  337. <goals>
  338. <goal>run</goal>
  339. </goals>
  340. <configuration>
  341. <target if="tar">
  342. <!-- Using Unix script to preserve symlinks -->
  343. <echo file="${project.build.directory}/dist-maketar.sh">
  344. cd "${project.build.directory}"
  345. tar cf - ${project.artifactId}-${project.version} | gzip > ${project.artifactId}-${project.version}.tar.gz
  346. </echo>
  347. <exec executable="${shell-executable}" dir="${project.build.directory}" failonerror="true">
  348. <arg line="./dist-maketar.sh"/>
  349. </exec>
  350. </target>
  351. </configuration>
  352. </execution>
  353. </executions>
  354. </plugin>
  355. <plugin>
  356. <groupId>org.apache.maven.plugins</groupId>
  357. <artifactId>maven-assembly-plugin</artifactId>
  358. <dependencies>
  359. <dependency>
  360. <groupId>org.apache.hadoop</groupId>
  361. <artifactId>hadoop-assemblies</artifactId>
  362. <version>${project.version}</version>
  363. </dependency>
  364. </dependencies>
  365. <executions>
  366. <execution>
  367. <id>dist</id>
  368. <phase>prepare-package</phase>
  369. <goals>
  370. <goal>single</goal>
  371. </goals>
  372. <configuration>
  373. <appendAssemblyId>false</appendAssemblyId>
  374. <attach>false</attach>
  375. <finalName>${project.artifactId}-${project.version}</finalName>
  376. <descriptorRefs>
  377. <descriptorRef>hadoop-dist</descriptorRef>
  378. </descriptorRefs>
  379. </configuration>
  380. </execution>
  381. </executions>
  382. </plugin>
  383. </plugins>
  384. </build>
  385. </profile>
  386. </profiles>
  387. </project>