pom.xml 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429
  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>
  14. <modelVersion>4.0.0</modelVersion>
  15. <parent>
  16. <groupId>org.apache.hadoop</groupId>
  17. <artifactId>hadoop-project</artifactId>
  18. <version>0.23.3-SNAPSHOT</version>
  19. <relativePath>../hadoop-project</relativePath>
  20. </parent>
  21. <groupId>org.apache.hadoop</groupId>
  22. <artifactId>hadoop-project-dist</artifactId>
  23. <version>0.23.3-SNAPSHOT</version>
  24. <description>Apache Hadoop Project Dist POM</description>
  25. <name>Apache Hadoop Project Dist POM</name>
  26. <packaging>pom</packaging>
  27. <properties>
  28. <hadoop.tmp.dir>${project.build.directory}/test</hadoop.tmp.dir>
  29. <test.build.data>${project.build.directory}/test/data</test.build.data>
  30. <hadoop.log.dir>${project.build.directory}/log</hadoop.log.dir>
  31. <test.build.webapps>${project.build.directory}/test-classes/webapps</test.build.webapps>
  32. <test.cache.data>${project.build.directory}/test-classes</test.cache.data>
  33. <test.build.classes>${project.build.directory}/test-classes</test.build.classes>
  34. <hadoop.component>UNDEF</hadoop.component>
  35. <bundle.snappy>false</bundle.snappy>
  36. </properties>
  37. <dependencies>
  38. <dependency>
  39. <groupId>org.apache.hadoop</groupId>
  40. <artifactId>hadoop-annotations</artifactId>
  41. <scope>provided</scope>
  42. </dependency>
  43. </dependencies>
  44. <build>
  45. <plugins>
  46. <plugin>
  47. <groupId>org.apache.maven.plugins</groupId>
  48. <artifactId>maven-jar-plugin</artifactId>
  49. <executions>
  50. <execution>
  51. <id>prepare-jar</id>
  52. <phase>prepare-package</phase>
  53. <goals>
  54. <goal>jar</goal>
  55. </goals>
  56. </execution>
  57. <execution>
  58. <id>prepare-test-jar</id>
  59. <phase>prepare-package</phase>
  60. <goals>
  61. <goal>test-jar</goal>
  62. </goals>
  63. <configuration>
  64. <includes>
  65. <include>**/*.class</include>
  66. <include>webapps/**</include>
  67. </includes>
  68. </configuration>
  69. </execution>
  70. </executions>
  71. </plugin>
  72. <plugin>
  73. <groupId>org.apache.maven.plugins</groupId>
  74. <artifactId>maven-source-plugin</artifactId>
  75. <executions>
  76. <execution>
  77. <phase>prepare-package</phase>
  78. <goals>
  79. <goal>jar</goal>
  80. <goal>test-jar</goal>
  81. </goals>
  82. </execution>
  83. </executions>
  84. <configuration>
  85. <attach>true</attach>
  86. </configuration>
  87. </plugin>
  88. <plugin>
  89. <groupId>org.codehaus.mojo</groupId>
  90. <artifactId>findbugs-maven-plugin</artifactId>
  91. <configuration>
  92. <excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml</excludeFilterFile>
  93. </configuration>
  94. </plugin>
  95. <plugin>
  96. <groupId>org.apache.maven.plugins</groupId>
  97. <artifactId>maven-checkstyle-plugin</artifactId>
  98. <configuration>
  99. <configLocation>file://${basedir}/dev-support/checkstyle.xml</configLocation>
  100. <failOnViolation>false</failOnViolation>
  101. <format>xml</format>
  102. <format>html</format>
  103. <outputFile>${project.build.directory}/test/checkstyle-errors.xml</outputFile>
  104. </configuration>
  105. </plugin>
  106. <plugin>
  107. <groupId>org.apache.maven.plugins</groupId>
  108. <artifactId>maven-javadoc-plugin</artifactId>
  109. <configuration>
  110. <linksource>true</linksource>
  111. <maxmemory>512m</maxmemory>
  112. <quiet>true</quiet>
  113. <verbose>false</verbose>
  114. <source>${maven.compile.source}</source>
  115. <charset>${maven.compile.encoding}</charset>
  116. <reportOutputDirectory>${project.build.directory}/site</reportOutputDirectory>
  117. <destDir>api</destDir>
  118. <groups>
  119. <group>
  120. <title>${project.name} API</title>
  121. <packages>org.apache.hadoop*</packages>
  122. </group>
  123. </groups>
  124. <doclet>org.apache.hadoop.classification.tools.ExcludePrivateAnnotationsStandardDoclet</doclet>
  125. <docletArtifacts>
  126. <docletArtifact>
  127. <groupId>org.apache.hadoop</groupId>
  128. <artifactId>hadoop-annotations</artifactId>
  129. <version>${project.version}</version>
  130. </docletArtifact>
  131. </docletArtifacts>
  132. <useStandardDocletOptions>true</useStandardDocletOptions>
  133. <!-- switch on dependency-driven aggregation -->
  134. <includeDependencySources>false</includeDependencySources>
  135. <dependencySourceIncludes>
  136. <!-- include ONLY dependencies I control -->
  137. <dependencySourceInclude>org.apache.hadoop:hadoop-annotations</dependencySourceInclude>
  138. </dependencySourceIncludes>
  139. </configuration>
  140. </plugin>
  141. </plugins>
  142. </build>
  143. <profiles>
  144. <profile>
  145. <id>docs</id>
  146. <activation>
  147. <activeByDefault>false</activeByDefault>
  148. </activation>
  149. <properties>
  150. <jdiff.stable.api>0.20.2</jdiff.stable.api>
  151. <jdiff.stability>-unstable</jdiff.stability>
  152. <jdiff.compatibility></jdiff.compatibility>
  153. <jdiff.javadoc.maxmemory>512m</jdiff.javadoc.maxmemory>
  154. </properties>
  155. <build>
  156. <plugins>
  157. <plugin>
  158. <groupId>org.apache.maven.plugins</groupId>
  159. <artifactId>maven-javadoc-plugin</artifactId>
  160. <executions>
  161. <execution>
  162. <goals>
  163. <goal>javadoc</goal>
  164. </goals>
  165. <phase>prepare-package</phase>
  166. </execution>
  167. </executions>
  168. </plugin>
  169. <plugin>
  170. <groupId>org.codehaus.mojo</groupId>
  171. <artifactId>findbugs-maven-plugin</artifactId>
  172. <executions>
  173. <execution>
  174. <goals>
  175. <goal>findbugs</goal>
  176. </goals>
  177. <phase>prepare-package</phase>
  178. </execution>
  179. </executions>
  180. <configuration>
  181. <excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml</excludeFilterFile>
  182. </configuration>
  183. </plugin>
  184. <plugin>
  185. <groupId>org.apache.maven.plugins</groupId>
  186. <artifactId>maven-dependency-plugin</artifactId>
  187. <executions>
  188. <execution>
  189. <id>site</id>
  190. <phase>prepare-package</phase>
  191. <goals>
  192. <goal>copy</goal>
  193. </goals>
  194. <configuration>
  195. <artifactItems>
  196. <artifactItem>
  197. <groupId>jdiff</groupId>
  198. <artifactId>jdiff</artifactId>
  199. <version>${jdiff.version}</version>
  200. <overWrite>false</overWrite>
  201. <outputDirectory>${project.build.directory}</outputDirectory>
  202. <destFileName>jdiff.jar</destFileName>
  203. </artifactItem>
  204. <artifactItem>
  205. <groupId>org.apache.hadoop</groupId>
  206. <artifactId>hadoop-annotations</artifactId>
  207. <version>${project.version}</version>
  208. <overWrite>false</overWrite>
  209. <outputDirectory>${project.build.directory}</outputDirectory>
  210. <destFileName>hadoop-annotations.jar</destFileName>
  211. </artifactItem>
  212. </artifactItems>
  213. </configuration>
  214. </execution>
  215. </executions>
  216. </plugin>
  217. <plugin>
  218. <groupId>org.apache.maven.plugins</groupId>
  219. <artifactId>maven-antrun-plugin</artifactId>
  220. <executions>
  221. <execution>
  222. <id>site</id>
  223. <phase>prepare-package</phase>
  224. <goals>
  225. <goal>run</goal>
  226. </goals>
  227. <configuration>
  228. <target if="is.hadoop.component">
  229. <mkdir dir="${project.build.directory}/docs-src"/>
  230. <copy todir="${project.build.directory}/docs-src">
  231. <fileset dir="${basedir}/src/main/docs"/>
  232. </copy>
  233. <!-- Docs -->
  234. <exec dir="${project.build.directory}/docs-src"
  235. executable="${env.FORREST_HOME}/bin/forrest"
  236. failonerror="true">
  237. </exec>
  238. <copy todir="${project.build.directory}/site">
  239. <fileset dir="${project.build.directory}/docs-src/build/site"/>
  240. </copy>
  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="hadoop-core ${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">
  276. <param name="-oldapi" value="hadoop-core ${jdiff.stable.api}"/>
  277. <param name="-newapi" value="hadoop-core ${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/${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. which cygpath 2> /dev/null
  324. if [ $? = 1 ]; then
  325. BUILD_DIR="${project.build.directory}"
  326. else
  327. BUILD_DIR=`cygpath --unix '${project.build.directory}'`
  328. fi
  329. TAR='tar cf -'
  330. UNTAR='tar xfBp -'
  331. LIB_DIR="${BUILD_DIR}/native/target/usr/local/lib"
  332. if [ -d $${LIB_DIR} ] ; then
  333. TARGET_DIR="${BUILD_DIR}/${project.artifactId}-${project.version}/lib/native"
  334. mkdir -p $${TARGET_DIR}
  335. cd $${LIB_DIR}
  336. $$TAR lib* | (cd $${TARGET_DIR}/; $$UNTAR)
  337. if [ "${bundle.snappy}" = "true" ] ; then
  338. cd ${snappy.lib}
  339. $$TAR *snappy* | (cd $${TARGET_DIR}/; $$UNTAR)
  340. fi
  341. fi
  342. </echo>
  343. <exec executable="sh" dir="${project.build.directory}" failonerror="true">
  344. <arg line="./dist-copynativelibs.sh"/>
  345. </exec>
  346. </target>
  347. </configuration>
  348. </execution>
  349. <execution>
  350. <id>tar</id>
  351. <phase>package</phase>
  352. <goals>
  353. <goal>run</goal>
  354. </goals>
  355. <configuration>
  356. <target if="tar">
  357. <!-- Using Unix script to preserve symlinks -->
  358. <echo file="${project.build.directory}/dist-maketar.sh">
  359. which cygpath 2> /dev/null
  360. if [ $? = 1 ]; then
  361. BUILD_DIR="${project.build.directory}"
  362. else
  363. BUILD_DIR=`cygpath --unix '${project.build.directory}'`
  364. fi
  365. cd ${BUILD_DIR}
  366. tar czf ${project.artifactId}-${project.version}.tar.gz ${project.artifactId}-${project.version}
  367. </echo>
  368. <exec executable="sh" dir="${project.build.directory}" failonerror="true">
  369. <arg line="./dist-maketar.sh"/>
  370. </exec>
  371. </target>
  372. </configuration>
  373. </execution>
  374. </executions>
  375. </plugin>
  376. <plugin>
  377. <groupId>org.apache.maven.plugins</groupId>
  378. <artifactId>maven-assembly-plugin</artifactId>
  379. <dependencies>
  380. <dependency>
  381. <groupId>org.apache.hadoop</groupId>
  382. <artifactId>hadoop-assemblies</artifactId>
  383. <version>${project.version}</version>
  384. </dependency>
  385. </dependencies>
  386. <executions>
  387. <execution>
  388. <id>dist</id>
  389. <phase>prepare-package</phase>
  390. <goals>
  391. <goal>single</goal>
  392. </goals>
  393. <configuration>
  394. <appendAssemblyId>false</appendAssemblyId>
  395. <attach>false</attach>
  396. <finalName>${project.artifactId}-${project.version}</finalName>
  397. <descriptorRefs>
  398. <descriptorRef>hadoop-dist</descriptorRef>
  399. </descriptorRefs>
  400. </configuration>
  401. </execution>
  402. </executions>
  403. </plugin>
  404. </plugins>
  405. </build>
  406. </profile>
  407. </profiles>
  408. </project>