pom.xml 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432
  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.isal>true</bundle.isal>
  41. <bundle.openssl>false</bundle.openssl>
  42. <bundle.openssl.in.bin>false</bundle.openssl.in.bin>
  43. </properties>
  44. <dependencies>
  45. <dependency>
  46. <groupId>org.apache.hadoop</groupId>
  47. <artifactId>hadoop-annotations</artifactId>
  48. <scope>provided</scope>
  49. </dependency>
  50. </dependencies>
  51. <build>
  52. <plugins>
  53. <plugin>
  54. <groupId>org.apache.maven.plugins</groupId>
  55. <artifactId>maven-jar-plugin</artifactId>
  56. <executions>
  57. <execution>
  58. <id>prepare-jar</id>
  59. <phase>prepare-package</phase>
  60. <goals>
  61. <goal>jar</goal>
  62. </goals>
  63. </execution>
  64. <execution>
  65. <id>prepare-test-jar</id>
  66. <phase>prepare-package</phase>
  67. <goals>
  68. <goal>test-jar</goal>
  69. </goals>
  70. <configuration>
  71. <includes>
  72. <include>**/*.class</include>
  73. <include>webapps/**</include>
  74. </includes>
  75. </configuration>
  76. </execution>
  77. </executions>
  78. </plugin>
  79. <plugin>
  80. <groupId>org.apache.maven.plugins</groupId>
  81. <artifactId>maven-source-plugin</artifactId>
  82. <executions>
  83. <execution>
  84. <phase>prepare-package</phase>
  85. <goals>
  86. <goal>jar</goal>
  87. <goal>test-jar</goal>
  88. </goals>
  89. </execution>
  90. </executions>
  91. <configuration>
  92. <attach>true</attach>
  93. </configuration>
  94. </plugin>
  95. <plugin>
  96. <groupId>org.codehaus.mojo</groupId>
  97. <artifactId>findbugs-maven-plugin</artifactId>
  98. <configuration>
  99. <excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml</excludeFilterFile>
  100. <fork>true</fork>
  101. <maxHeap>2048</maxHeap>
  102. </configuration>
  103. </plugin>
  104. <plugin>
  105. <groupId>org.apache.maven.plugins</groupId>
  106. <artifactId>maven-javadoc-plugin</artifactId>
  107. <configuration>
  108. <linksource>true</linksource>
  109. <maxmemory>512m</maxmemory>
  110. <quiet>true</quiet>
  111. <verbose>false</verbose>
  112. <source>${maven.compile.source}</source>
  113. <charset>${maven.compile.encoding}</charset>
  114. <reportOutputDirectory>${project.build.directory}/site</reportOutputDirectory>
  115. <destDir>api</destDir>
  116. <groups>
  117. <group>
  118. <title>${project.name} API</title>
  119. <packages>org.apache.hadoop*</packages>
  120. </group>
  121. </groups>
  122. <doclet>org.apache.hadoop.classification.tools.ExcludePrivateAnnotationsStandardDoclet</doclet>
  123. <docletArtifacts>
  124. <docletArtifact>
  125. <groupId>org.apache.hadoop</groupId>
  126. <artifactId>hadoop-annotations</artifactId>
  127. <version>${project.version}</version>
  128. </docletArtifact>
  129. </docletArtifacts>
  130. <useStandardDocletOptions>true</useStandardDocletOptions>
  131. <!-- switch on dependency-driven aggregation -->
  132. <includeDependencySources>false</includeDependencySources>
  133. <dependencySourceIncludes>
  134. <!-- include ONLY dependencies I control -->
  135. <dependencySourceInclude>org.apache.hadoop:hadoop-annotations</dependencySourceInclude>
  136. </dependencySourceIncludes>
  137. </configuration>
  138. </plugin>
  139. </plugins>
  140. </build>
  141. <profiles>
  142. <profile>
  143. <id>docs</id>
  144. <activation>
  145. <activeByDefault>false</activeByDefault>
  146. </activation>
  147. <properties>
  148. <jdiff.stable.api>2.6.0</jdiff.stable.api>
  149. <jdiff.stability>-unstable</jdiff.stability>
  150. <!-- Commented out for HADOOP-11776 -->
  151. <!-- Uncomment param name="${jdiff.compatibility}" in javadoc doclet if compatibility is not empty -->
  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. <artifactItem>
  213. <groupId>xerces</groupId>
  214. <artifactId>xercesImpl</artifactId>
  215. <version>${xerces.jdiff.version}</version>
  216. <overWrite>false</overWrite>
  217. <outputDirectory>${project.build.directory}</outputDirectory>
  218. <destFileName>xerces.jar</destFileName>
  219. </artifactItem>
  220. </artifactItems>
  221. </configuration>
  222. </execution>
  223. </executions>
  224. </plugin>
  225. <plugin>
  226. <groupId>org.apache.maven.plugins</groupId>
  227. <artifactId>maven-antrun-plugin</artifactId>
  228. <executions>
  229. <execution>
  230. <id>site</id>
  231. <phase>prepare-package</phase>
  232. <goals>
  233. <goal>run</goal>
  234. </goals>
  235. <configuration>
  236. <target if="is.hadoop.component">
  237. <mkdir dir="${project.build.directory}/docs-src"/>
  238. <!-- Docs -->
  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. <!-- Jdiff -->
  244. <mkdir dir="${project.build.directory}/site/jdiff/xml"/>
  245. <javadoc maxmemory="${jdiff.javadoc.maxmemory}" verbose="yes">
  246. <doclet name="org.apache.hadoop.classification.tools.ExcludePrivateAnnotationsJDiffDoclet"
  247. path="${project.build.directory}/hadoop-annotations.jar:${project.build.directory}/jdiff.jar">
  248. <param name="-apidir" value="${project.build.directory}/site/jdiff/xml"/>
  249. <param name="-apiname" value="${project.name} ${project.version}"/>
  250. <param name="${jdiff.stability}"/>
  251. </doclet>
  252. <packageset dir="${basedir}/src/main/java"/>
  253. <classpath>
  254. <path refid="maven.compile.classpath"/>
  255. </classpath>
  256. </javadoc>
  257. <javadoc sourcepath="${basedir}/src/main/java"
  258. destdir="${project.build.directory}/site/jdiff/xml"
  259. sourceFiles="${basedir}/dev-support/jdiff/Null.java"
  260. maxmemory="${jdiff.javadoc.maxmemory}">
  261. <doclet name="org.apache.hadoop.classification.tools.ExcludePrivateAnnotationsJDiffDoclet"
  262. path="${project.build.directory}/hadoop-annotations.jar:${project.build.directory}/jdiff.jar:${project.build.directory}/xerces.jar">
  263. <param name="-oldapi" value="${project.name} ${jdiff.stable.api}"/>
  264. <param name="-newapi" value="${project.name} ${project.version}"/>
  265. <param name="-oldapidir" value="${basedir}/dev-support/jdiff"/>
  266. <param name="-newapidir" value="${project.build.directory}/site/jdiff/xml"/>
  267. <param name="-javadocold"
  268. value="http://hadoop.apache.org/docs/r${jdiff.stable.api}/api/"/>
  269. <param name="-javadocnew" value="${project.build.directory}/site/api"/>
  270. <param name="-stats"/>
  271. <param name="${jdiff.stability}"/>
  272. <!--param name="${jdiff.compatibility}"/-->
  273. </doclet>
  274. <classpath>
  275. <path refid="maven.compile.classpath"/>
  276. </classpath>
  277. </javadoc>
  278. <xslt style="${env.FINDBUGS_HOME}/src/xsl/default.xsl"
  279. in="${project.build.directory}/findbugsXml.xml"
  280. out="${project.build.directory}/site/findbugs.html"/>
  281. </target>
  282. </configuration>
  283. </execution>
  284. </executions>
  285. </plugin>
  286. </plugins>
  287. </build>
  288. </profile>
  289. <profile>
  290. <id>dist</id>
  291. <activation>
  292. <activeByDefault>false</activeByDefault>
  293. </activation>
  294. <build>
  295. <plugins>
  296. <plugin>
  297. <groupId>org.apache.maven.plugins</groupId>
  298. <artifactId>maven-antrun-plugin</artifactId>
  299. <executions>
  300. <execution>
  301. <id>pre-dist</id>
  302. <phase>prepare-package</phase>
  303. <goals>
  304. <goal>run</goal>
  305. </goals>
  306. <configuration>
  307. <target>
  308. <!-- Using Unix script to preserve symlinks -->
  309. <echo file="${project.build.directory}/dist-copynativelibs.sh">
  310. BUILD_DIR="${project.build.directory}"
  311. TAR='tar cf -'
  312. UNTAR='tar xfBp -'
  313. LIB_DIR="${BUILD_DIR}/native/target/usr/local/lib"
  314. if [ -d $${LIB_DIR} ] ; then
  315. TARGET_DIR="${BUILD_DIR}/${project.artifactId}-${project.version}/lib/native"
  316. mkdir -p $${TARGET_DIR}
  317. cd $${LIB_DIR}
  318. $$TAR lib* | (cd $${TARGET_DIR}/; $$UNTAR)
  319. if [ "X${bundle.snappy}" = "Xtrue" ] ; then
  320. cd "${snappy.lib}"
  321. $$TAR *snappy* | (cd $${TARGET_DIR}/; $$UNTAR)
  322. fi
  323. if [ "X${bundle.openssl}" = "Xtrue" ] ; then
  324. cd "${openssl.lib}"
  325. $$TAR *crypto* | (cd $${TARGET_DIR}/; $$UNTAR)
  326. fi
  327. if [ "X${bundle.isal}" = "Xtrue" ] ; then
  328. if [ "X${isal.lib}" != "X" ]; then
  329. cd "${isal.lib}"
  330. $$TAR *isa* | (cd $${TARGET_DIR}/; $$UNTAR)
  331. else
  332. echo "The required option isal.lib isn't given, bundling ISA-L skipped"
  333. fi
  334. fi
  335. fi
  336. BIN_DIR="${BUILD_DIR}/bin"
  337. if [ -d $${BIN_DIR} ] ; then
  338. TARGET_BIN_DIR="${BUILD_DIR}/${project.artifactId}-${project.version}/bin"
  339. mkdir -p $${TARGET_BIN_DIR}
  340. cd $${BIN_DIR}
  341. $$TAR * | (cd $${TARGET_BIN_DIR}/; $$UNTAR)
  342. if [ "${bundle.snappy.in.bin}" = "true" ] ; then
  343. if [ "${bundle.snappy}" = "true" ] ; then
  344. cd "${snappy.lib}"
  345. $$TAR *snappy* | (cd $${TARGET_BIN_DIR}/; $$UNTAR)
  346. fi
  347. fi
  348. if [ "${bundle.openssl.in.bin}" = "true" ] ; then
  349. if [ "${bundle.openssl}" = "true" ] ; then
  350. cd "${openssl.lib}"
  351. $$TAR *crypto* | (cd $${TARGET_BIN_DIR}/; $$UNTAR)
  352. fi
  353. fi
  354. fi
  355. </echo>
  356. <exec executable="${shell-executable}" dir="${project.build.directory}" failonerror="true">
  357. <arg line="./dist-copynativelibs.sh"/>
  358. </exec>
  359. </target>
  360. </configuration>
  361. </execution>
  362. <execution>
  363. <id>tar</id>
  364. <phase>package</phase>
  365. <goals>
  366. <goal>run</goal>
  367. </goals>
  368. <configuration>
  369. <target if="tar">
  370. <!-- Using Unix script to preserve symlinks -->
  371. <echo file="${project.build.directory}/dist-maketar.sh">
  372. cd "${project.build.directory}"
  373. tar cf - ${project.artifactId}-${project.version} | gzip > ${project.artifactId}-${project.version}.tar.gz
  374. </echo>
  375. <exec executable="${shell-executable}" dir="${project.build.directory}" failonerror="true">
  376. <arg line="./dist-maketar.sh"/>
  377. </exec>
  378. </target>
  379. </configuration>
  380. </execution>
  381. </executions>
  382. </plugin>
  383. <plugin>
  384. <groupId>org.apache.maven.plugins</groupId>
  385. <artifactId>maven-assembly-plugin</artifactId>
  386. <dependencies>
  387. <dependency>
  388. <groupId>org.apache.hadoop</groupId>
  389. <artifactId>hadoop-assemblies</artifactId>
  390. <version>${project.version}</version>
  391. </dependency>
  392. </dependencies>
  393. <executions>
  394. <execution>
  395. <id>dist</id>
  396. <phase>prepare-package</phase>
  397. <goals>
  398. <goal>single</goal>
  399. </goals>
  400. <configuration>
  401. <appendAssemblyId>false</appendAssemblyId>
  402. <attach>false</attach>
  403. <finalName>${project.artifactId}-${project.version}</finalName>
  404. <descriptorRefs>
  405. <descriptorRef>hadoop-dist</descriptorRef>
  406. </descriptorRefs>
  407. </configuration>
  408. </execution>
  409. </executions>
  410. </plugin>
  411. </plugins>
  412. </build>
  413. </profile>
  414. </profiles>
  415. </project>