pom.xml 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546
  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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  16. <modelVersion>4.0.0</modelVersion>
  17. <groupId>org.apache.hadoop</groupId>
  18. <artifactId>hadoop-main</artifactId>
  19. <version>2.8.0-SNAPSHOT</version>
  20. <description>Apache Hadoop Main</description>
  21. <name>Apache Hadoop Main</name>
  22. <packaging>pom</packaging>
  23. <dependencyManagement>
  24. <dependencies>
  25. <dependency>
  26. <groupId>com.cenqua.clover</groupId>
  27. <artifactId>clover</artifactId>
  28. <!-- Use the version needed by maven-clover-plugin -->
  29. <version>3.0.2</version>
  30. </dependency>
  31. </dependencies>
  32. </dependencyManagement>
  33. <distributionManagement>
  34. <repository>
  35. <id>${distMgmtStagingId}</id>
  36. <name>${distMgmtStagingName}</name>
  37. <url>${distMgmtStagingUrl}</url>
  38. </repository>
  39. <snapshotRepository>
  40. <id>${distMgmtSnapshotsId}</id>
  41. <name>${distMgmtSnapshotsName}</name>
  42. <url>${distMgmtSnapshotsUrl}</url>
  43. </snapshotRepository>
  44. <site>
  45. <id>apache.website</id>
  46. <url>scpexe://people.apache.org/www/hadoop.apache.org/docs/r${project.version}</url>
  47. </site>
  48. </distributionManagement>
  49. <repositories>
  50. <repository>
  51. <id>${distMgmtSnapshotsId}</id>
  52. <name>${distMgmtSnapshotsName}</name>
  53. <url>${distMgmtSnapshotsUrl}</url>
  54. </repository>
  55. <repository>
  56. <id>repository.jboss.org</id>
  57. <url>http://repository.jboss.org/nexus/content/groups/public/</url>
  58. <snapshots>
  59. <enabled>false</enabled>
  60. </snapshots>
  61. </repository>
  62. </repositories>
  63. <licenses>
  64. <license>
  65. <name>Apache License, Version 2.0</name>
  66. <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
  67. </license>
  68. </licenses>
  69. <organization>
  70. <name>Apache Software Foundation</name>
  71. <url>http://www.apache.org</url>
  72. </organization>
  73. <properties>
  74. <distMgmtSnapshotsId>apache.snapshots.https</distMgmtSnapshotsId>
  75. <distMgmtSnapshotsName>Apache Development Snapshot Repository</distMgmtSnapshotsName>
  76. <distMgmtSnapshotsUrl>https://repository.apache.org/content/repositories/snapshots</distMgmtSnapshotsUrl>
  77. <distMgmtStagingId>apache.staging.https</distMgmtStagingId>
  78. <distMgmtStagingName>Apache Release Distribution Repository</distMgmtStagingName>
  79. <distMgmtStagingUrl>https://repository.apache.org/service/local/staging/deploy/maven2</distMgmtStagingUrl>
  80. <!-- platform encoding override -->
  81. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  82. <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
  83. <!-- maven plugin versions -->
  84. <maven-deploy-plugin.version>2.8.1</maven-deploy-plugin.version>
  85. <maven-site-plugin.version>3.5</maven-site-plugin.version>
  86. <maven-stylus-skin.version>1.5</maven-stylus-skin.version>
  87. <maven-antrun-plugin.version>1.7</maven-antrun-plugin.version>
  88. <maven-assembly-plugin.version>2.4</maven-assembly-plugin.version>
  89. <maven-dependency-plugin.version>2.8</maven-dependency-plugin.version>
  90. <maven-enforcer-plugin.version>1.3.1</maven-enforcer-plugin.version>
  91. <maven-javadoc-plugin.version>2.9.1</maven-javadoc-plugin.version>
  92. <apache-rat-plugin.version>0.10</apache-rat-plugin.version>
  93. <wagon-ssh.version>1.0</wagon-ssh.version>
  94. <maven-clover2-plugin.version>3.3.0</maven-clover2-plugin.version>
  95. <maven-bundle-plugin.version>2.5.0</maven-bundle-plugin.version>
  96. <maven-checkstyle-plugin.version>2.15</maven-checkstyle-plugin.version>
  97. <checkstyle.version>6.6</checkstyle.version>
  98. <shell-executable>bash</shell-executable>
  99. </properties>
  100. <modules>
  101. <module>hadoop-project</module>
  102. <module>hadoop-project-dist</module>
  103. <module>hadoop-assemblies</module>
  104. <module>hadoop-maven-plugins</module>
  105. <module>hadoop-common-project</module>
  106. <module>hadoop-hdfs-project</module>
  107. <module>hadoop-yarn-project</module>
  108. <module>hadoop-mapreduce-project</module>
  109. <module>hadoop-tools</module>
  110. <module>hadoop-dist</module>
  111. <module>hadoop-client</module>
  112. <module>hadoop-minicluster</module>
  113. <module>hadoop-build-tools</module>
  114. </modules>
  115. <build>
  116. <pluginManagement>
  117. <plugins>
  118. <plugin>
  119. <groupId>org.apache.maven.plugins</groupId>
  120. <artifactId>maven-dependency-plugin</artifactId>
  121. <version>${maven-dependency-plugin.version}</version>
  122. </plugin>
  123. <plugin>
  124. <groupId>org.apache.maven.plugins</groupId>
  125. <artifactId>maven-enforcer-plugin</artifactId>
  126. <version>${maven-enforcer-plugin.version}</version>
  127. <configuration>
  128. <rules>
  129. <requireMavenVersion>
  130. <version>[3.0.2,)</version>
  131. </requireMavenVersion>
  132. <requireJavaVersion>
  133. <version>[1.7,)</version>
  134. </requireJavaVersion>
  135. </rules>
  136. </configuration>
  137. </plugin>
  138. <plugin>
  139. <groupId>org.apache.maven.plugins</groupId>
  140. <artifactId>maven-assembly-plugin</artifactId>
  141. <version>${maven-assembly-plugin.version}</version>
  142. </plugin>
  143. <plugin>
  144. <groupId>org.apache.maven.plugins</groupId>
  145. <artifactId>maven-deploy-plugin</artifactId>
  146. <version>${maven-deploy-plugin.version}</version>
  147. </plugin>
  148. <plugin>
  149. <groupId>org.apache.rat</groupId>
  150. <artifactId>apache-rat-plugin</artifactId>
  151. <version>${apache-rat-plugin.version}</version>
  152. </plugin>
  153. <plugin>
  154. <groupId>org.apache.maven.plugins</groupId>
  155. <artifactId>maven-antrun-plugin</artifactId>
  156. <version>${maven-antrun-plugin.version}</version>
  157. </plugin>
  158. <plugin>
  159. <groupId>org.apache.maven.plugins</groupId>
  160. <artifactId>maven-site-plugin</artifactId>
  161. <version>${maven-site-plugin.version}</version>
  162. <dependencies>
  163. <dependency><!-- add support for ssh/scp -->
  164. <groupId>org.apache.maven.wagon</groupId>
  165. <artifactId>wagon-ssh</artifactId>
  166. <version>${wagon-ssh.version}</version>
  167. </dependency>
  168. </dependencies>
  169. </plugin>
  170. <plugin>
  171. <groupId>com.atlassian.maven.plugins</groupId>
  172. <artifactId>maven-clover2-plugin</artifactId>
  173. <version>${maven-clover2-plugin.version}</version>
  174. </plugin>
  175. <plugin>
  176. <groupId>org.apache.felix</groupId>
  177. <artifactId>maven-bundle-plugin</artifactId>
  178. <version>${maven-bundle-plugin.version}</version>
  179. </plugin>
  180. <plugin>
  181. <groupId>org.apache.maven.plugins</groupId>
  182. <artifactId>maven-checkstyle-plugin</artifactId>
  183. <version>${maven-checkstyle-plugin.version}</version>
  184. <dependencies>
  185. <dependency>
  186. <groupId>org.apache.hadoop</groupId>
  187. <artifactId>hadoop-build-tools</artifactId>
  188. <version>${project.version}</version>
  189. </dependency>
  190. <dependency>
  191. <groupId>com.puppycrawl.tools</groupId>
  192. <artifactId>checkstyle</artifactId>
  193. <version>${checkstyle.version}</version>
  194. </dependency>
  195. </dependencies>
  196. <configuration>
  197. <configLocation>checkstyle/checkstyle.xml</configLocation>
  198. <failOnViolation>false</failOnViolation>
  199. <format>xml</format>
  200. <format>html</format>
  201. <outputFile>${project.build.directory}/test/checkstyle-errors.xml</outputFile>
  202. </configuration>
  203. </plugin>
  204. </plugins>
  205. </pluginManagement>
  206. <plugins>
  207. <plugin>
  208. <groupId>org.apache.maven.plugins</groupId>
  209. <artifactId>maven-enforcer-plugin</artifactId>
  210. <inherited>false</inherited>
  211. <executions>
  212. <execution>
  213. <id>clean</id>
  214. <goals>
  215. <goal>enforce</goal>
  216. </goals>
  217. <phase>pre-clean</phase>
  218. </execution>
  219. <execution>
  220. <id>default</id>
  221. <goals>
  222. <goal>enforce</goal>
  223. </goals>
  224. <phase>validate</phase>
  225. </execution>
  226. <execution>
  227. <id>site</id>
  228. <goals>
  229. <goal>enforce</goal>
  230. </goals>
  231. <phase>pre-site</phase>
  232. </execution>
  233. </executions>
  234. </plugin>
  235. <plugin>
  236. <groupId>org.apache.rat</groupId>
  237. <artifactId>apache-rat-plugin</artifactId>
  238. <configuration>
  239. <excludes>
  240. <exclude>.gitattributes</exclude>
  241. <exclude>.gitignore</exclude>
  242. <exclude>.git/**</exclude>
  243. <exclude>.idea/**</exclude>
  244. <exclude>**/build/**</exclude>
  245. <exclude>**/patchprocess/**</exclude>
  246. </excludes>
  247. </configuration>
  248. </plugin>
  249. <plugin>
  250. <artifactId>maven-site-plugin</artifactId>
  251. <executions>
  252. <execution>
  253. <id>attach-descriptor</id>
  254. <goals>
  255. <goal>attach-descriptor</goal>
  256. </goals>
  257. <configuration>
  258. <generateReports>true</generateReports>
  259. </configuration>
  260. </execution>
  261. </executions>
  262. </plugin>
  263. <plugin>
  264. <groupId>org.apache.felix</groupId>
  265. <artifactId>maven-bundle-plugin</artifactId>
  266. <inherited>true</inherited>
  267. <extensions>true</extensions>
  268. </plugin>
  269. <plugin>
  270. <groupId>org.apache.maven.plugins</groupId>
  271. <artifactId>maven-checkstyle-plugin</artifactId>
  272. <version>${maven-checkstyle-plugin.version}</version>
  273. </plugin>
  274. </plugins>
  275. </build>
  276. <reporting>
  277. <excludeDefaults>true</excludeDefaults>
  278. <plugins>
  279. <plugin>
  280. <groupId>org.apache.maven.plugins</groupId>
  281. <artifactId>maven-javadoc-plugin</artifactId>
  282. <version>${maven-javadoc-plugin.version}</version>
  283. <inherited>false</inherited>
  284. <reportSets>
  285. <reportSet>
  286. <id>aggregate</id>
  287. <configuration>
  288. <maxmemory>1024m</maxmemory>
  289. <linksource>true</linksource>
  290. <quiet>true</quiet>
  291. <verbose>false</verbose>
  292. <source>${maven.compile.source}</source>
  293. <charset>${maven.compile.encoding}</charset>
  294. <reportOutputDirectory>${project.build.directory}/site</reportOutputDirectory>
  295. <destDir>hadoop-project/api</destDir>
  296. <!-- Non-public APIs -->
  297. <excludePackageNames>org.apache.hadoop.authentication*,org.apache.hadoop.hdfs*,org.apache.hadoop.mapreduce.v2.proto,org.apache.hadoop.yarn.proto,org.apache.hadoop.yarn.server*,org.apache.hadoop.yarn.webapp*</excludePackageNames>
  298. <groups>
  299. <group>
  300. <title>Common</title>
  301. <packages>org.apache.hadoop*</packages>
  302. </group>
  303. <group>
  304. <title>MapReduce</title>
  305. <packages>org.apache.hadoop.mapred*</packages>
  306. </group>
  307. <group>
  308. <title>YARN</title>
  309. <packages>org.apache.hadoop.yarn*</packages>
  310. </group>
  311. </groups>
  312. <doclet>org.apache.hadoop.classification.tools.IncludePublicAnnotationsStandardDoclet</doclet>
  313. <docletArtifacts>
  314. <docletArtifact>
  315. <groupId>org.apache.hadoop</groupId>
  316. <artifactId>hadoop-annotations</artifactId>
  317. <version>${project.version}</version>
  318. </docletArtifact>
  319. </docletArtifacts>
  320. <useStandardDocletOptions>true</useStandardDocletOptions>
  321. <!-- switch on dependency-driven aggregation -->
  322. <includeDependencySources>false</includeDependencySources>
  323. <dependencySourceIncludes>
  324. <!-- include ONLY dependencies I control -->
  325. <dependencySourceInclude>org.apache.hadoop:hadoop-annotations</dependencySourceInclude>
  326. </dependencySourceIncludes>
  327. </configuration>
  328. <reports>
  329. <report>aggregate</report>
  330. </reports>
  331. </reportSet>
  332. </reportSets>
  333. </plugin>
  334. <plugin>
  335. <groupId>org.apache.maven.plugins</groupId>
  336. <artifactId>maven-dependency-plugin</artifactId>
  337. <version>${maven-dependency-plugin.version}</version>
  338. <reportSets>
  339. <reportSet>
  340. <reports>
  341. <report>analyze-report</report>
  342. </reports>
  343. </reportSet>
  344. </reportSets>
  345. </plugin>
  346. </plugins>
  347. </reporting>
  348. <profiles>
  349. <profile>
  350. <id>src</id>
  351. <activation>
  352. <activeByDefault>false</activeByDefault>
  353. </activation>
  354. <build>
  355. <plugins>
  356. <plugin>
  357. <groupId>org.apache.maven.plugins</groupId>
  358. <artifactId>maven-assembly-plugin</artifactId>
  359. <inherited>false</inherited>
  360. <executions>
  361. <execution>
  362. <id>src-dist</id>
  363. <phase>package</phase>
  364. <goals>
  365. <goal>single</goal>
  366. </goals>
  367. <configuration>
  368. <appendAssemblyId>false</appendAssemblyId>
  369. <attach>false</attach>
  370. <finalName>hadoop-${project.version}-src</finalName>
  371. <outputDirectory>hadoop-dist/target</outputDirectory>
  372. <!-- Not using descriptorRef and hadoop-assembly dependency -->
  373. <!-- to avoid making hadoop-main to depend on a module -->
  374. <descriptors>
  375. <descriptor>hadoop-assemblies/src/main/resources/assemblies/hadoop-src.xml</descriptor>
  376. </descriptors>
  377. </configuration>
  378. </execution>
  379. </executions>
  380. </plugin>
  381. <plugin>
  382. <groupId>org.apache.maven.plugins</groupId>
  383. <artifactId>maven-antrun-plugin</artifactId>
  384. <inherited>false</inherited>
  385. <executions>
  386. <execution>
  387. <id>src-dist-msg</id>
  388. <phase>package</phase>
  389. <goals>
  390. <goal>run</goal>
  391. </goals>
  392. <configuration>
  393. <target>
  394. <echo/>
  395. <echo>Hadoop source tar available at: ${basedir}/hadoop-dist/target/hadoop-${project.version}-src.tar.gz</echo>
  396. <echo/>
  397. </target>
  398. </configuration>
  399. </execution>
  400. </executions>
  401. </plugin>
  402. </plugins>
  403. </build>
  404. </profile>
  405. <profile>
  406. <id>dist</id>
  407. <!-- Profile for generating all maven artifacts and documentation. -->
  408. <build>
  409. <plugins>
  410. <plugin>
  411. <groupId>org.apache.maven.plugins</groupId>
  412. <artifactId>maven-javadoc-plugin</artifactId>
  413. <inherited>false</inherited>
  414. <executions>
  415. <execution>
  416. <!-- build aggregate javadoc in parent only -->
  417. <id>default-cli</id>
  418. <goals>
  419. <goal>aggregate</goal>
  420. </goals>
  421. <configuration>
  422. <overview>hadoop-common-project/hadoop-common/src/main/java/overview.html</overview>
  423. </configuration>
  424. </execution>
  425. </executions>
  426. </plugin>
  427. </plugins>
  428. </build>
  429. </profile>
  430. <profile>
  431. <id>sign</id>
  432. <build>
  433. <plugins>
  434. <plugin>
  435. <groupId>org.apache.maven.plugins</groupId>
  436. <artifactId>maven-gpg-plugin</artifactId>
  437. <executions>
  438. <execution>
  439. <id>sign-artifacts</id>
  440. <phase>verify</phase>
  441. <goals>
  442. <goal>sign</goal>
  443. </goals>
  444. </execution>
  445. </executions>
  446. </plugin>
  447. </plugins>
  448. </build>
  449. </profile>
  450. <profile>
  451. <id>clover</id>
  452. <activation>
  453. <activeByDefault>false</activeByDefault>
  454. <property>
  455. <name>clover</name>
  456. </property>
  457. </activation>
  458. <properties>
  459. <cloverLicenseLocation>${user.home}/.clover.license</cloverLicenseLocation>
  460. <cloverDatabase>${project.build.directory}/clover/hadoop-coverage.db</cloverDatabase>
  461. <!-- NB: This additional parametrization is made in order
  462. to be able to re-define these properties with "-Dk=v" maven options.
  463. By some reason the expressions declared in clover
  464. docs like "${maven.clover.generateHtml}" do not work in that way.
  465. However, the below properties are confirmed to work: e.g.
  466. -DcloverGenHtml=false switches off the Html generation.
  467. The default values provided here exactly correspond to Clover defaults, so
  468. the behavior is 100% backwards compatible. -->
  469. <cloverAlwaysReport>true</cloverAlwaysReport>
  470. <cloverGenHtml>true</cloverGenHtml>
  471. <cloverGenXml>true</cloverGenXml>
  472. <cloverGenHistorical>false</cloverGenHistorical>
  473. </properties>
  474. <build>
  475. <plugins>
  476. <plugin>
  477. <groupId>com.atlassian.maven.plugins</groupId>
  478. <artifactId>maven-clover2-plugin</artifactId>
  479. <configuration>
  480. <includesAllSourceRoots>false</includesAllSourceRoots>
  481. <includesTestSourceRoots>true</includesTestSourceRoots>
  482. <licenseLocation>${cloverLicenseLocation}</licenseLocation>
  483. <cloverDatabase>${cloverDatabase}</cloverDatabase>
  484. <targetPercentage>50%</targetPercentage>
  485. <outputDirectory>${project.build.directory}/clover</outputDirectory>
  486. <alwaysReport>${cloverAlwaysReport}</alwaysReport>
  487. <generateHtml>${cloverGenHtml}</generateHtml>
  488. <generateXml>${cloverGenXml}</generateXml>
  489. <generateHistorical>${cloverGenHistorical}</generateHistorical>
  490. <excludes>
  491. <exclude>**/examples/**/*.java</exclude>
  492. <exclude>**/hamlet/*.java</exclude>
  493. <exclude>**/ha/proto/*.java</exclude>
  494. <exclude>**/protocol/proto/*.java</exclude>
  495. <exclude>**/compiler/generated/*.java</exclude>
  496. <exclude>**/protobuf/*.java</exclude>
  497. <exclude>**/v2/proto/*.java</exclude>
  498. <exclude>**/yarn/proto/*.java</exclude>
  499. <exclude>**/security/proto/*.java</exclude>
  500. <exclude>**/tools/proto/*.java</exclude>
  501. <exclude>**/hs/proto/*.java</exclude>
  502. </excludes>
  503. </configuration>
  504. <executions>
  505. <execution>
  506. <id>clover-setup</id>
  507. <phase>process-sources</phase>
  508. <goals>
  509. <goal>setup</goal>
  510. </goals>
  511. </execution>
  512. <execution>
  513. <id>clover</id>
  514. <phase>test</phase>
  515. <goals>
  516. <goal>clover</goal>
  517. </goals>
  518. </execution>
  519. </executions>
  520. </plugin>
  521. </plugins>
  522. </build>
  523. </profile>
  524. </profiles>
  525. </project>