pom.xml 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423
  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>3.0.0-SNAPSHOT</version>
  22. <relativePath>../hadoop-project</relativePath>
  23. </parent>
  24. <groupId>org.apache.hadoop</groupId>
  25. <artifactId>hadoop-project-dist</artifactId>
  26. <version>3.0.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. <!-- Docs -->
  238. <style basedir="${basedir}/src/main/resources"
  239. destdir="${project.build.directory}/site"
  240. includes="core-default.xml"
  241. style="${basedir}/src/main/xsl/configuration.xsl"/>
  242. <!-- Jdiff -->
  243. <mkdir dir="${project.build.directory}/site/jdiff/xml"/>
  244. <javadoc maxmemory="${jdiff.javadoc.maxmemory}" verbose="yes">
  245. <doclet name="org.apache.hadoop.classification.tools.ExcludePrivateAnnotationsJDiffDoclet"
  246. path="${project.build.directory}/hadoop-annotations.jar:${project.build.directory}/jdiff.jar">
  247. <param name="-apidir" value="${project.build.directory}/site/jdiff/xml"/>
  248. <param name="-apiname" value="${project.name} ${project.version}"/>
  249. <param name="${jdiff.stability}"/>
  250. </doclet>
  251. <packageset dir="${basedir}/src/main/java"/>
  252. <classpath>
  253. <path refid="maven.compile.classpath"/>
  254. </classpath>
  255. </javadoc>
  256. <javadoc sourcepath="${basedir}/src/main/java"
  257. destdir="${project.build.directory}/site/jdiff/xml"
  258. sourceFiles="${basedir}/dev-support/jdiff/Null.java"
  259. maxmemory="${jdiff.javadoc.maxmemory}">
  260. <doclet name="org.apache.hadoop.classification.tools.ExcludePrivateAnnotationsJDiffDoclet"
  261. path="${project.build.directory}/hadoop-annotations.jar:${project.build.directory}/jdiff.jar:${project.build.directory}/xerces.jar">
  262. <param name="-oldapi" value="${project.name} ${jdiff.stable.api}"/>
  263. <param name="-newapi" value="${project.name} ${project.version}"/>
  264. <param name="-oldapidir" value="${basedir}/dev-support/jdiff"/>
  265. <param name="-newapidir" value="${project.build.directory}/site/jdiff/xml"/>
  266. <param name="-javadocold"
  267. value="http://hadoop.apache.org/docs/r${jdiff.stable.api}/api/"/>
  268. <param name="-javadocnew" value="${project.build.directory}/site/api"/>
  269. <param name="-stats"/>
  270. <param name="${jdiff.stability}"/>
  271. <!--param name="${jdiff.compatibility}"/-->
  272. </doclet>
  273. <classpath>
  274. <path refid="maven.compile.classpath"/>
  275. </classpath>
  276. </javadoc>
  277. <xslt style="${env.FINDBUGS_HOME}/src/xsl/default.xsl"
  278. in="${project.build.directory}/findbugsXml.xml"
  279. out="${project.build.directory}/site/findbugs.html"/>
  280. </target>
  281. </configuration>
  282. </execution>
  283. </executions>
  284. </plugin>
  285. </plugins>
  286. </build>
  287. </profile>
  288. <profile>
  289. <id>dist</id>
  290. <activation>
  291. <activeByDefault>false</activeByDefault>
  292. </activation>
  293. <build>
  294. <plugins>
  295. <plugin>
  296. <groupId>org.apache.maven.plugins</groupId>
  297. <artifactId>maven-antrun-plugin</artifactId>
  298. <executions>
  299. <execution>
  300. <id>pre-dist</id>
  301. <phase>prepare-package</phase>
  302. <goals>
  303. <goal>run</goal>
  304. </goals>
  305. <configuration>
  306. <target>
  307. <!-- Using Unix script to preserve symlinks -->
  308. <echo file="${project.build.directory}/dist-copynativelibs.sh">
  309. BUILD_DIR="${project.build.directory}"
  310. TAR='tar cf -'
  311. UNTAR='tar xfBp -'
  312. LIB_DIR="${BUILD_DIR}/native/target/usr/local/lib"
  313. if [ -d $${LIB_DIR} ] ; then
  314. TARGET_DIR="${BUILD_DIR}/${project.artifactId}-${project.version}/lib/native"
  315. mkdir -p $${TARGET_DIR}
  316. cd $${LIB_DIR}
  317. $$TAR lib* | (cd $${TARGET_DIR}/; $$UNTAR)
  318. if [ "${bundle.snappy}" = "true" ] ; then
  319. cd "${snappy.lib}"
  320. $$TAR *snappy* | (cd $${TARGET_DIR}/; $$UNTAR)
  321. fi
  322. if [ "${bundle.openssl}" = "true" ] ; then
  323. cd "${openssl.lib}"
  324. $$TAR *crypto* | (cd $${TARGET_DIR}/; $$UNTAR)
  325. fi
  326. fi
  327. BIN_DIR="${BUILD_DIR}/bin"
  328. if [ -d $${BIN_DIR} ] ; then
  329. TARGET_BIN_DIR="${BUILD_DIR}/${project.artifactId}-${project.version}/bin"
  330. mkdir -p $${TARGET_BIN_DIR}
  331. cd $${BIN_DIR}
  332. $$TAR * | (cd $${TARGET_BIN_DIR}/; $$UNTAR)
  333. if [ "${bundle.snappy.in.bin}" = "true" ] ; then
  334. if [ "${bundle.snappy}" = "true" ] ; then
  335. cd "${snappy.lib}"
  336. $$TAR *snappy* | (cd $${TARGET_BIN_DIR}/; $$UNTAR)
  337. fi
  338. fi
  339. if [ "${bundle.openssl.in.bin}" = "true" ] ; then
  340. if [ "${bundle.openssl}" = "true" ] ; then
  341. cd "${openssl.lib}"
  342. $$TAR *crypto* | (cd $${TARGET_BIN_DIR}/; $$UNTAR)
  343. fi
  344. fi
  345. fi
  346. </echo>
  347. <exec executable="${shell-executable}" dir="${project.build.directory}" failonerror="true">
  348. <arg line="./dist-copynativelibs.sh"/>
  349. </exec>
  350. </target>
  351. </configuration>
  352. </execution>
  353. <execution>
  354. <id>tar</id>
  355. <phase>package</phase>
  356. <goals>
  357. <goal>run</goal>
  358. </goals>
  359. <configuration>
  360. <target if="tar">
  361. <!-- Using Unix script to preserve symlinks -->
  362. <echo file="${project.build.directory}/dist-maketar.sh">
  363. cd "${project.build.directory}"
  364. tar cf - ${project.artifactId}-${project.version} | gzip > ${project.artifactId}-${project.version}.tar.gz
  365. </echo>
  366. <exec executable="${shell-executable}" dir="${project.build.directory}" failonerror="true">
  367. <arg line="./dist-maketar.sh"/>
  368. </exec>
  369. </target>
  370. </configuration>
  371. </execution>
  372. </executions>
  373. </plugin>
  374. <plugin>
  375. <groupId>org.apache.maven.plugins</groupId>
  376. <artifactId>maven-assembly-plugin</artifactId>
  377. <dependencies>
  378. <dependency>
  379. <groupId>org.apache.hadoop</groupId>
  380. <artifactId>hadoop-assemblies</artifactId>
  381. <version>${project.version}</version>
  382. </dependency>
  383. </dependencies>
  384. <executions>
  385. <execution>
  386. <id>dist</id>
  387. <phase>prepare-package</phase>
  388. <goals>
  389. <goal>single</goal>
  390. </goals>
  391. <configuration>
  392. <appendAssemblyId>false</appendAssemblyId>
  393. <attach>false</attach>
  394. <finalName>${project.artifactId}-${project.version}</finalName>
  395. <descriptorRefs>
  396. <descriptorRef>hadoop-dist</descriptorRef>
  397. </descriptorRefs>
  398. </configuration>
  399. </execution>
  400. </executions>
  401. </plugin>
  402. </plugins>
  403. </build>
  404. </profile>
  405. </profiles>
  406. </project>