pom.xml 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431
  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>0.23.3</version>
  22. <relativePath>../hadoop-project</relativePath>
  23. </parent>
  24. <groupId>org.apache.hadoop</groupId>
  25. <artifactId>hadoop-project-dist</artifactId>
  26. <version>0.23.3</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. <quiet>true</quiet>
  115. <verbose>false</verbose>
  116. <source>${maven.compile.source}</source>
  117. <charset>${maven.compile.encoding}</charset>
  118. <reportOutputDirectory>${project.build.directory}/site</reportOutputDirectory>
  119. <destDir>api</destDir>
  120. <groups>
  121. <group>
  122. <title>${project.name} API</title>
  123. <packages>org.apache.hadoop*</packages>
  124. </group>
  125. </groups>
  126. <doclet>org.apache.hadoop.classification.tools.ExcludePrivateAnnotationsStandardDoclet</doclet>
  127. <docletArtifacts>
  128. <docletArtifact>
  129. <groupId>org.apache.hadoop</groupId>
  130. <artifactId>hadoop-annotations</artifactId>
  131. <version>${project.version}</version>
  132. </docletArtifact>
  133. </docletArtifacts>
  134. <useStandardDocletOptions>true</useStandardDocletOptions>
  135. <!-- switch on dependency-driven aggregation -->
  136. <includeDependencySources>false</includeDependencySources>
  137. <dependencySourceIncludes>
  138. <!-- include ONLY dependencies I control -->
  139. <dependencySourceInclude>org.apache.hadoop:hadoop-annotations</dependencySourceInclude>
  140. </dependencySourceIncludes>
  141. </configuration>
  142. </plugin>
  143. </plugins>
  144. </build>
  145. <profiles>
  146. <profile>
  147. <id>docs</id>
  148. <activation>
  149. <activeByDefault>false</activeByDefault>
  150. </activation>
  151. <properties>
  152. <jdiff.stable.api>0.20.2</jdiff.stable.api>
  153. <jdiff.stability>-unstable</jdiff.stability>
  154. <jdiff.compatibility></jdiff.compatibility>
  155. <jdiff.javadoc.maxmemory>512m</jdiff.javadoc.maxmemory>
  156. </properties>
  157. <build>
  158. <plugins>
  159. <plugin>
  160. <groupId>org.apache.maven.plugins</groupId>
  161. <artifactId>maven-javadoc-plugin</artifactId>
  162. <executions>
  163. <execution>
  164. <goals>
  165. <goal>javadoc</goal>
  166. </goals>
  167. <phase>prepare-package</phase>
  168. </execution>
  169. </executions>
  170. </plugin>
  171. <plugin>
  172. <groupId>org.codehaus.mojo</groupId>
  173. <artifactId>findbugs-maven-plugin</artifactId>
  174. <executions>
  175. <execution>
  176. <goals>
  177. <goal>findbugs</goal>
  178. </goals>
  179. <phase>prepare-package</phase>
  180. </execution>
  181. </executions>
  182. <configuration>
  183. <excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml</excludeFilterFile>
  184. </configuration>
  185. </plugin>
  186. <plugin>
  187. <groupId>org.apache.maven.plugins</groupId>
  188. <artifactId>maven-dependency-plugin</artifactId>
  189. <executions>
  190. <execution>
  191. <id>site</id>
  192. <phase>prepare-package</phase>
  193. <goals>
  194. <goal>copy</goal>
  195. </goals>
  196. <configuration>
  197. <artifactItems>
  198. <artifactItem>
  199. <groupId>jdiff</groupId>
  200. <artifactId>jdiff</artifactId>
  201. <version>${jdiff.version}</version>
  202. <overWrite>false</overWrite>
  203. <outputDirectory>${project.build.directory}</outputDirectory>
  204. <destFileName>jdiff.jar</destFileName>
  205. </artifactItem>
  206. <artifactItem>
  207. <groupId>org.apache.hadoop</groupId>
  208. <artifactId>hadoop-annotations</artifactId>
  209. <version>${project.version}</version>
  210. <overWrite>false</overWrite>
  211. <outputDirectory>${project.build.directory}</outputDirectory>
  212. <destFileName>hadoop-annotations.jar</destFileName>
  213. </artifactItem>
  214. </artifactItems>
  215. </configuration>
  216. </execution>
  217. </executions>
  218. </plugin>
  219. <plugin>
  220. <groupId>org.apache.maven.plugins</groupId>
  221. <artifactId>maven-antrun-plugin</artifactId>
  222. <executions>
  223. <execution>
  224. <id>site</id>
  225. <phase>prepare-package</phase>
  226. <goals>
  227. <goal>run</goal>
  228. </goals>
  229. <configuration>
  230. <target if="is.hadoop.component">
  231. <mkdir dir="${project.build.directory}/docs-src"/>
  232. <copy todir="${project.build.directory}/docs-src">
  233. <fileset dir="${basedir}/src/main/docs"/>
  234. </copy>
  235. <!-- Docs -->
  236. <exec dir="${project.build.directory}/docs-src"
  237. executable="${env.FORREST_HOME}/bin/forrest"
  238. failonerror="true">
  239. </exec>
  240. <copy todir="${project.build.directory}/site">
  241. <fileset dir="${project.build.directory}/docs-src/build/site"/>
  242. </copy>
  243. <copy file="${project.build.directory}/docs-src/releasenotes.html"
  244. todir="${project.build.directory}/site"/>
  245. <style basedir="${basedir}/src/main/resources"
  246. destdir="${project.build.directory}/site"
  247. includes="core-default.xml"
  248. style="${basedir}/src/main/xsl/configuration.xsl"/>
  249. <!-- Convert 'CHANGES.txt' to 'changes.html" -->
  250. <exec executable="perl" input="${basedir}/../CHANGES.txt"
  251. output="${project.build.directory}/site/changes.html"
  252. failonerror="true">
  253. <arg value="${project.build.directory}/docs-src/changes/changes2html.pl"/>
  254. </exec>
  255. <copy todir="${project.build.directory}/site">
  256. <fileset dir="${project.build.directory}/docs-src/changes" includes="*.css"/>
  257. </copy>
  258. <!-- Jdiff -->
  259. <mkdir dir="${project.build.directory}/site/jdiff/xml"/>
  260. <javadoc maxmemory="${jdiff.javadoc.maxmemory}" verbose="yes">
  261. <doclet name="org.apache.hadoop.classification.tools.ExcludePrivateAnnotationsJDiffDoclet"
  262. path="${project.build.directory}/hadoop-annotations.jar:${project.build.directory}/jdiff.jar">
  263. <param name="-apidir" value="${project.build.directory}/site/jdiff/xml"/>
  264. <param name="-apiname" value="hadoop-core ${project.version}"/>
  265. <param name="${jdiff.stability}"/>
  266. </doclet>
  267. <packageset dir="${basedir}/src/main/java"/>
  268. <classpath>
  269. <path refid="maven.compile.classpath"/>
  270. </classpath>
  271. </javadoc>
  272. <javadoc sourcepath="${basedir}/src/main/java"
  273. destdir="${project.build.directory}/site/jdiff/xml"
  274. sourceFiles="${basedir}/dev-support/jdiff/Null.java"
  275. maxmemory="${jdiff.javadoc.maxmemory}">
  276. <doclet name="org.apache.hadoop.classification.tools.ExcludePrivateAnnotationsJDiffDoclet"
  277. path="${project.build.directory}/hadoop-annotations.jar:${project.build.directory}/jdiff.jar">
  278. <param name="-oldapi" value="hadoop-core ${jdiff.stable.api}"/>
  279. <param name="-newapi" value="hadoop-core ${project.version}"/>
  280. <param name="-oldapidir" value="${basedir}/dev-support/jdiff"/>
  281. <param name="-newapidir" value="${project.build.directory}/site/jdiff/xml"/>
  282. <param name="-javadocold"
  283. value="http://hadoop.apache.org/docs/${jdiff.stable.api}/api/"/>
  284. <param name="-javadocnew" value="${project.build.directory}/site/api"/>
  285. <param name="-stats"/>
  286. <param name="${jdiff.stability}"/>
  287. <param name="${jdiff.compatibility}"/>
  288. </doclet>
  289. <classpath>
  290. <path refid="maven.compile.classpath"/>
  291. </classpath>
  292. </javadoc>
  293. <xslt style="${env.FINDBUGS_HOME}/src/xsl/default.xsl"
  294. in="${project.build.directory}/findbugsXml.xml"
  295. out="${project.build.directory}/site/findbugs.html"/>
  296. </target>
  297. </configuration>
  298. </execution>
  299. </executions>
  300. </plugin>
  301. </plugins>
  302. </build>
  303. </profile>
  304. <profile>
  305. <id>dist</id>
  306. <activation>
  307. <activeByDefault>false</activeByDefault>
  308. </activation>
  309. <build>
  310. <plugins>
  311. <plugin>
  312. <groupId>org.apache.maven.plugins</groupId>
  313. <artifactId>maven-antrun-plugin</artifactId>
  314. <executions>
  315. <execution>
  316. <id>pre-dist</id>
  317. <phase>prepare-package</phase>
  318. <goals>
  319. <goal>run</goal>
  320. </goals>
  321. <configuration>
  322. <target>
  323. <!-- Using Unix script to preserve symlinks -->
  324. <echo file="${project.build.directory}/dist-copynativelibs.sh">
  325. which cygpath 2&gt; /dev/null
  326. if [ $? = 1 ]; then
  327. BUILD_DIR="${project.build.directory}"
  328. else
  329. BUILD_DIR=`cygpath --unix '${project.build.directory}'`
  330. fi
  331. TAR='tar cf -'
  332. UNTAR='tar xfBp -'
  333. LIB_DIR="${BUILD_DIR}/native/target/usr/local/lib"
  334. if [ -d $${LIB_DIR} ] ; then
  335. TARGET_DIR="${BUILD_DIR}/${project.artifactId}-${project.version}/lib/native"
  336. mkdir -p $${TARGET_DIR}
  337. cd $${LIB_DIR}
  338. $$TAR lib* | (cd $${TARGET_DIR}/; $$UNTAR)
  339. if [ "${bundle.snappy}" = "true" ] ; then
  340. cd ${snappy.lib}
  341. $$TAR *snappy* | (cd $${TARGET_DIR}/; $$UNTAR)
  342. fi
  343. fi
  344. </echo>
  345. <exec executable="sh" dir="${project.build.directory}" failonerror="true">
  346. <arg line="./dist-copynativelibs.sh"/>
  347. </exec>
  348. </target>
  349. </configuration>
  350. </execution>
  351. <execution>
  352. <id>tar</id>
  353. <phase>package</phase>
  354. <goals>
  355. <goal>run</goal>
  356. </goals>
  357. <configuration>
  358. <target if="tar">
  359. <!-- Using Unix script to preserve symlinks -->
  360. <echo file="${project.build.directory}/dist-maketar.sh">
  361. which cygpath 2&gt; /dev/null
  362. if [ $? = 1 ]; then
  363. BUILD_DIR="${project.build.directory}"
  364. else
  365. BUILD_DIR=`cygpath --unix '${project.build.directory}'`
  366. fi
  367. cd ${BUILD_DIR}
  368. tar czf ${project.artifactId}-${project.version}.tar.gz ${project.artifactId}-${project.version}
  369. </echo>
  370. <exec executable="sh" dir="${project.build.directory}" failonerror="true">
  371. <arg line="./dist-maketar.sh"/>
  372. </exec>
  373. </target>
  374. </configuration>
  375. </execution>
  376. </executions>
  377. </plugin>
  378. <plugin>
  379. <groupId>org.apache.maven.plugins</groupId>
  380. <artifactId>maven-assembly-plugin</artifactId>
  381. <dependencies>
  382. <dependency>
  383. <groupId>org.apache.hadoop</groupId>
  384. <artifactId>hadoop-assemblies</artifactId>
  385. <version>${project.version}</version>
  386. </dependency>
  387. </dependencies>
  388. <executions>
  389. <execution>
  390. <id>dist</id>
  391. <phase>prepare-package</phase>
  392. <goals>
  393. <goal>single</goal>
  394. </goals>
  395. <configuration>
  396. <appendAssemblyId>false</appendAssemblyId>
  397. <attach>false</attach>
  398. <finalName>${project.artifactId}-${project.version}</finalName>
  399. <descriptorRefs>
  400. <descriptorRef>hadoop-dist</descriptorRef>
  401. </descriptorRefs>
  402. </configuration>
  403. </execution>
  404. </executions>
  405. </plugin>
  406. </plugins>
  407. </build>
  408. </profile>
  409. </profiles>
  410. </project>