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.0.6-alpha</version>
  22. <relativePath>../hadoop-project</relativePath>
  23. </parent>
  24. <groupId>org.apache.hadoop</groupId>
  25. <artifactId>hadoop-project-dist</artifactId>
  26. <version>2.0.6-alpha</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. </properties>
  40. <dependencies>
  41. <dependency>
  42. <groupId>org.apache.hadoop</groupId>
  43. <artifactId>hadoop-annotations</artifactId>
  44. <scope>provided</scope>
  45. </dependency>
  46. </dependencies>
  47. <build>
  48. <plugins>
  49. <plugin>
  50. <groupId>org.apache.maven.plugins</groupId>
  51. <artifactId>maven-jar-plugin</artifactId>
  52. <executions>
  53. <execution>
  54. <id>prepare-jar</id>
  55. <phase>prepare-package</phase>
  56. <goals>
  57. <goal>jar</goal>
  58. </goals>
  59. </execution>
  60. <execution>
  61. <id>prepare-test-jar</id>
  62. <phase>prepare-package</phase>
  63. <goals>
  64. <goal>test-jar</goal>
  65. </goals>
  66. <configuration>
  67. <includes>
  68. <include>**/*.class</include>
  69. <include>webapps/**</include>
  70. </includes>
  71. </configuration>
  72. </execution>
  73. </executions>
  74. </plugin>
  75. <plugin>
  76. <groupId>org.apache.maven.plugins</groupId>
  77. <artifactId>maven-source-plugin</artifactId>
  78. <executions>
  79. <execution>
  80. <phase>prepare-package</phase>
  81. <goals>
  82. <goal>jar</goal>
  83. <goal>test-jar</goal>
  84. </goals>
  85. </execution>
  86. </executions>
  87. <configuration>
  88. <attach>true</attach>
  89. </configuration>
  90. </plugin>
  91. <plugin>
  92. <groupId>org.codehaus.mojo</groupId>
  93. <artifactId>findbugs-maven-plugin</artifactId>
  94. <configuration>
  95. <excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml</excludeFilterFile>
  96. </configuration>
  97. </plugin>
  98. <plugin>
  99. <groupId>org.apache.maven.plugins</groupId>
  100. <artifactId>maven-checkstyle-plugin</artifactId>
  101. <configuration>
  102. <configLocation>file://${basedir}/dev-support/checkstyle.xml</configLocation>
  103. <failOnViolation>false</failOnViolation>
  104. <format>xml</format>
  105. <format>html</format>
  106. <outputFile>${project.build.directory}/test/checkstyle-errors.xml</outputFile>
  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>0.20.2</jdiff.stable.api>
  154. <jdiff.stability>-unstable</jdiff.stability>
  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. </artifactItems>
  216. </configuration>
  217. </execution>
  218. </executions>
  219. </plugin>
  220. <plugin>
  221. <groupId>org.apache.maven.plugins</groupId>
  222. <artifactId>maven-antrun-plugin</artifactId>
  223. <executions>
  224. <execution>
  225. <id>site</id>
  226. <phase>prepare-package</phase>
  227. <goals>
  228. <goal>run</goal>
  229. </goals>
  230. <configuration>
  231. <target if="is.hadoop.component">
  232. <mkdir dir="${project.build.directory}/docs-src"/>
  233. <copy todir="${project.build.directory}/docs-src">
  234. <fileset dir="${basedir}/src/main/docs"/>
  235. </copy>
  236. <!-- Docs -->
  237. <copy file="${project.build.directory}/docs-src/releasenotes.html"
  238. todir="${project.build.directory}/site"/>
  239. <style basedir="${basedir}/src/main/resources"
  240. destdir="${project.build.directory}/site"
  241. includes="core-default.xml"
  242. style="${basedir}/src/main/xsl/configuration.xsl"/>
  243. <!-- Convert 'CHANGES.txt' to 'changes.html" -->
  244. <exec executable="perl" input="${basedir}/../CHANGES.txt"
  245. output="${project.build.directory}/site/changes.html"
  246. failonerror="true">
  247. <arg value="${project.build.directory}/docs-src/changes/changes2html.pl"/>
  248. </exec>
  249. <copy todir="${project.build.directory}/site">
  250. <fileset dir="${project.build.directory}/docs-src/changes" includes="*.css"/>
  251. </copy>
  252. <!-- Jdiff -->
  253. <mkdir dir="${project.build.directory}/site/jdiff/xml"/>
  254. <javadoc maxmemory="${jdiff.javadoc.maxmemory}" verbose="yes">
  255. <doclet name="org.apache.hadoop.classification.tools.ExcludePrivateAnnotationsJDiffDoclet"
  256. path="${project.build.directory}/hadoop-annotations.jar:${project.build.directory}/jdiff.jar">
  257. <param name="-apidir" value="${project.build.directory}/site/jdiff/xml"/>
  258. <param name="-apiname" value="hadoop-core ${project.version}"/>
  259. <param name="${jdiff.stability}"/>
  260. </doclet>
  261. <packageset dir="${basedir}/src/main/java"/>
  262. <classpath>
  263. <path refid="maven.compile.classpath"/>
  264. </classpath>
  265. </javadoc>
  266. <javadoc sourcepath="${basedir}/src/main/java"
  267. destdir="${project.build.directory}/site/jdiff/xml"
  268. sourceFiles="${basedir}/dev-support/jdiff/Null.java"
  269. maxmemory="${jdiff.javadoc.maxmemory}">
  270. <doclet name="org.apache.hadoop.classification.tools.ExcludePrivateAnnotationsJDiffDoclet"
  271. path="${project.build.directory}/hadoop-annotations.jar:${project.build.directory}/jdiff.jar">
  272. <param name="-oldapi" value="hadoop-core ${jdiff.stable.api}"/>
  273. <param name="-newapi" value="hadoop-core ${project.version}"/>
  274. <param name="-oldapidir" value="${basedir}/dev-support/jdiff"/>
  275. <param name="-newapidir" value="${project.build.directory}/site/jdiff/xml"/>
  276. <param name="-javadocold"
  277. value="http://hadoop.apache.org/docs/${jdiff.stable.api}/api/"/>
  278. <param name="-javadocnew" value="${project.build.directory}/site/api"/>
  279. <param name="-stats"/>
  280. <param name="${jdiff.stability}"/>
  281. <param name="${jdiff.compatibility}"/>
  282. </doclet>
  283. <classpath>
  284. <path refid="maven.compile.classpath"/>
  285. </classpath>
  286. </javadoc>
  287. <xslt style="${env.FINDBUGS_HOME}/src/xsl/default.xsl"
  288. in="${project.build.directory}/findbugsXml.xml"
  289. out="${project.build.directory}/site/findbugs.html"/>
  290. </target>
  291. </configuration>
  292. </execution>
  293. </executions>
  294. </plugin>
  295. </plugins>
  296. </build>
  297. </profile>
  298. <profile>
  299. <id>dist</id>
  300. <activation>
  301. <activeByDefault>false</activeByDefault>
  302. </activation>
  303. <build>
  304. <plugins>
  305. <plugin>
  306. <groupId>org.apache.maven.plugins</groupId>
  307. <artifactId>maven-antrun-plugin</artifactId>
  308. <executions>
  309. <execution>
  310. <id>pre-dist</id>
  311. <phase>prepare-package</phase>
  312. <goals>
  313. <goal>run</goal>
  314. </goals>
  315. <configuration>
  316. <target>
  317. <!-- Using Unix script to preserve symlinks -->
  318. <echo file="${project.build.directory}/dist-copynativelibs.sh">
  319. which cygpath 2&gt; /dev/null
  320. if [ $? = 1 ]; then
  321. BUILD_DIR="${project.build.directory}"
  322. else
  323. BUILD_DIR=`cygpath --unix '${project.build.directory}'`
  324. fi
  325. TAR='tar cf -'
  326. UNTAR='tar xfBp -'
  327. LIB_DIR="${BUILD_DIR}/native/target/usr/local/lib"
  328. if [ -d $${LIB_DIR} ] ; then
  329. TARGET_DIR="${BUILD_DIR}/${project.artifactId}-${project.version}/lib/native"
  330. mkdir -p $${TARGET_DIR}
  331. cd $${LIB_DIR}
  332. $$TAR lib* | (cd $${TARGET_DIR}/; $$UNTAR)
  333. if [ "${bundle.snappy}" = "true" ] ; then
  334. cd ${snappy.lib}
  335. $$TAR *snappy* | (cd $${TARGET_DIR}/; $$UNTAR)
  336. fi
  337. fi
  338. </echo>
  339. <exec executable="sh" dir="${project.build.directory}" failonerror="true">
  340. <arg line="./dist-copynativelibs.sh"/>
  341. </exec>
  342. </target>
  343. </configuration>
  344. </execution>
  345. <execution>
  346. <id>tar</id>
  347. <phase>package</phase>
  348. <goals>
  349. <goal>run</goal>
  350. </goals>
  351. <configuration>
  352. <target if="tar">
  353. <!-- Using Unix script to preserve symlinks -->
  354. <echo file="${project.build.directory}/dist-maketar.sh">
  355. which cygpath 2&gt; /dev/null
  356. if [ $? = 1 ]; then
  357. BUILD_DIR="${project.build.directory}"
  358. else
  359. BUILD_DIR=`cygpath --unix '${project.build.directory}'`
  360. fi
  361. cd ${BUILD_DIR}
  362. tar czf ${project.artifactId}-${project.version}.tar.gz ${project.artifactId}-${project.version}
  363. </echo>
  364. <exec executable="sh" 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>