pom.xml 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512
  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.7.3</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.4</maven-site-plugin.version>
  86. <maven-antrun-plugin.version>1.7</maven-antrun-plugin.version>
  87. <maven-assembly-plugin.version>2.4</maven-assembly-plugin.version>
  88. <maven-dependency-plugin.version>2.8</maven-dependency-plugin.version>
  89. <maven-enforcer-plugin.version>1.3.1</maven-enforcer-plugin.version>
  90. <maven-javadoc-plugin.version>2.9.1</maven-javadoc-plugin.version>
  91. <apache-rat-plugin.version>0.10</apache-rat-plugin.version>
  92. <wagon-ssh.version>1.0</wagon-ssh.version>
  93. <maven-clover2-plugin.version>3.3.0</maven-clover2-plugin.version>
  94. <maven-bundle-plugin.version>2.5.0</maven-bundle-plugin.version>
  95. </properties>
  96. <modules>
  97. <module>hadoop-project</module>
  98. <module>hadoop-project-dist</module>
  99. <module>hadoop-assemblies</module>
  100. <module>hadoop-maven-plugins</module>
  101. <module>hadoop-common-project</module>
  102. <module>hadoop-hdfs-project</module>
  103. <module>hadoop-yarn-project</module>
  104. <module>hadoop-mapreduce-project</module>
  105. <module>hadoop-tools</module>
  106. <module>hadoop-dist</module>
  107. <module>hadoop-client</module>
  108. <module>hadoop-minicluster</module>
  109. <module>hadoop-build-tools</module>
  110. </modules>
  111. <build>
  112. <pluginManagement>
  113. <plugins>
  114. <plugin>
  115. <groupId>org.apache.maven.plugins</groupId>
  116. <artifactId>maven-dependency-plugin</artifactId>
  117. <version>${maven-dependency-plugin.version}</version>
  118. </plugin>
  119. <plugin>
  120. <groupId>org.apache.maven.plugins</groupId>
  121. <artifactId>maven-enforcer-plugin</artifactId>
  122. <version>${maven-enforcer-plugin.version}</version>
  123. <configuration>
  124. <rules>
  125. <requireMavenVersion>
  126. <version>[3.0.2,)</version>
  127. </requireMavenVersion>
  128. <requireJavaVersion>
  129. <version>[1.7,)</version>
  130. </requireJavaVersion>
  131. </rules>
  132. </configuration>
  133. </plugin>
  134. <plugin>
  135. <groupId>org.apache.maven.plugins</groupId>
  136. <artifactId>maven-assembly-plugin</artifactId>
  137. <version>${maven-assembly-plugin.version}</version>
  138. </plugin>
  139. <plugin>
  140. <groupId>org.apache.maven.plugins</groupId>
  141. <artifactId>maven-deploy-plugin</artifactId>
  142. <version>${maven-deploy-plugin.version}</version>
  143. </plugin>
  144. <plugin>
  145. <groupId>org.apache.rat</groupId>
  146. <artifactId>apache-rat-plugin</artifactId>
  147. <version>${apache-rat-plugin.version}</version>
  148. </plugin>
  149. <plugin>
  150. <groupId>org.apache.maven.plugins</groupId>
  151. <artifactId>maven-antrun-plugin</artifactId>
  152. <version>${maven-antrun-plugin.version}</version>
  153. </plugin>
  154. <plugin>
  155. <groupId>org.apache.maven.plugins</groupId>
  156. <artifactId>maven-site-plugin</artifactId>
  157. <version>${maven-site-plugin.version}</version>
  158. <dependencies>
  159. <dependency><!-- add support for ssh/scp -->
  160. <groupId>org.apache.maven.wagon</groupId>
  161. <artifactId>wagon-ssh</artifactId>
  162. <version>${wagon-ssh.version}</version>
  163. </dependency>
  164. </dependencies>
  165. </plugin>
  166. <plugin>
  167. <groupId>com.atlassian.maven.plugins</groupId>
  168. <artifactId>maven-clover2-plugin</artifactId>
  169. <version>${maven-clover2-plugin.version}</version>
  170. </plugin>
  171. <plugin>
  172. <groupId>org.apache.felix</groupId>
  173. <artifactId>maven-bundle-plugin</artifactId>
  174. <version>${maven-bundle-plugin.version}</version>
  175. </plugin>
  176. </plugins>
  177. </pluginManagement>
  178. <plugins>
  179. <plugin>
  180. <groupId>org.apache.maven.plugins</groupId>
  181. <artifactId>maven-enforcer-plugin</artifactId>
  182. <inherited>false</inherited>
  183. <executions>
  184. <execution>
  185. <id>clean</id>
  186. <goals>
  187. <goal>enforce</goal>
  188. </goals>
  189. <phase>pre-clean</phase>
  190. </execution>
  191. <execution>
  192. <id>default</id>
  193. <goals>
  194. <goal>enforce</goal>
  195. </goals>
  196. <phase>validate</phase>
  197. </execution>
  198. <execution>
  199. <id>site</id>
  200. <goals>
  201. <goal>enforce</goal>
  202. </goals>
  203. <phase>pre-site</phase>
  204. </execution>
  205. </executions>
  206. </plugin>
  207. <plugin>
  208. <groupId>org.apache.rat</groupId>
  209. <artifactId>apache-rat-plugin</artifactId>
  210. <configuration>
  211. <excludes>
  212. <exclude>.gitattributes</exclude>
  213. <exclude>.gitignore</exclude>
  214. <exclude>.git/**</exclude>
  215. <exclude>.idea/**</exclude>
  216. <exclude>**/build/**</exclude>
  217. <exclude>**/patchprocess/**</exclude>
  218. </excludes>
  219. </configuration>
  220. </plugin>
  221. <plugin>
  222. <artifactId>maven-site-plugin</artifactId>
  223. <executions>
  224. <execution>
  225. <id>attach-descriptor</id>
  226. <goals>
  227. <goal>attach-descriptor</goal>
  228. </goals>
  229. <configuration>
  230. <generateReports>true</generateReports>
  231. </configuration>
  232. </execution>
  233. </executions>
  234. </plugin>
  235. <plugin>
  236. <groupId>org.apache.felix</groupId>
  237. <artifactId>maven-bundle-plugin</artifactId>
  238. <inherited>true</inherited>
  239. <extensions>true</extensions>
  240. </plugin>
  241. </plugins>
  242. </build>
  243. <reporting>
  244. <excludeDefaults>true</excludeDefaults>
  245. <plugins>
  246. <plugin>
  247. <groupId>org.apache.maven.plugins</groupId>
  248. <artifactId>maven-javadoc-plugin</artifactId>
  249. <version>${maven-javadoc-plugin.version}</version>
  250. <inherited>false</inherited>
  251. <reportSets>
  252. <reportSet>
  253. <id>aggregate</id>
  254. <configuration>
  255. <maxmemory>1024m</maxmemory>
  256. <linksource>true</linksource>
  257. <quiet>true</quiet>
  258. <verbose>false</verbose>
  259. <source>${maven.compile.source}</source>
  260. <charset>${maven.compile.encoding}</charset>
  261. <reportOutputDirectory>${project.build.directory}/site</reportOutputDirectory>
  262. <destDir>hadoop-project/api</destDir>
  263. <!-- Non-public APIs -->
  264. <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>
  265. <groups>
  266. <group>
  267. <title>Common</title>
  268. <packages>org.apache.hadoop*</packages>
  269. </group>
  270. <group>
  271. <title>MapReduce</title>
  272. <packages>org.apache.hadoop.mapred*</packages>
  273. </group>
  274. <group>
  275. <title>YARN</title>
  276. <packages>org.apache.hadoop.yarn*</packages>
  277. </group>
  278. </groups>
  279. <doclet>org.apache.hadoop.classification.tools.IncludePublicAnnotationsStandardDoclet</doclet>
  280. <docletArtifacts>
  281. <docletArtifact>
  282. <groupId>org.apache.hadoop</groupId>
  283. <artifactId>hadoop-annotations</artifactId>
  284. <version>${project.version}</version>
  285. </docletArtifact>
  286. </docletArtifacts>
  287. <useStandardDocletOptions>true</useStandardDocletOptions>
  288. <!-- switch on dependency-driven aggregation -->
  289. <includeDependencySources>false</includeDependencySources>
  290. <dependencySourceIncludes>
  291. <!-- include ONLY dependencies I control -->
  292. <dependencySourceInclude>org.apache.hadoop:hadoop-annotations</dependencySourceInclude>
  293. </dependencySourceIncludes>
  294. </configuration>
  295. <reports>
  296. <report>aggregate</report>
  297. </reports>
  298. </reportSet>
  299. </reportSets>
  300. </plugin>
  301. <plugin>
  302. <groupId>org.apache.maven.plugins</groupId>
  303. <artifactId>maven-dependency-plugin</artifactId>
  304. <version>${maven-dependency-plugin.version}</version>
  305. <reportSets>
  306. <reportSet>
  307. <reports>
  308. <report>analyze-report</report>
  309. </reports>
  310. </reportSet>
  311. </reportSets>
  312. </plugin>
  313. </plugins>
  314. </reporting>
  315. <profiles>
  316. <profile>
  317. <id>src</id>
  318. <activation>
  319. <activeByDefault>false</activeByDefault>
  320. </activation>
  321. <build>
  322. <plugins>
  323. <plugin>
  324. <groupId>org.apache.maven.plugins</groupId>
  325. <artifactId>maven-assembly-plugin</artifactId>
  326. <inherited>false</inherited>
  327. <executions>
  328. <execution>
  329. <id>src-dist</id>
  330. <phase>package</phase>
  331. <goals>
  332. <goal>single</goal>
  333. </goals>
  334. <configuration>
  335. <appendAssemblyId>false</appendAssemblyId>
  336. <attach>false</attach>
  337. <finalName>hadoop-${project.version}-src</finalName>
  338. <outputDirectory>hadoop-dist/target</outputDirectory>
  339. <!-- Not using descriptorRef and hadoop-assembly dependency -->
  340. <!-- to avoid making hadoop-main to depend on a module -->
  341. <descriptors>
  342. <descriptor>hadoop-assemblies/src/main/resources/assemblies/hadoop-src.xml</descriptor>
  343. </descriptors>
  344. </configuration>
  345. </execution>
  346. </executions>
  347. </plugin>
  348. <plugin>
  349. <groupId>org.apache.maven.plugins</groupId>
  350. <artifactId>maven-antrun-plugin</artifactId>
  351. <inherited>false</inherited>
  352. <executions>
  353. <execution>
  354. <id>src-dist-msg</id>
  355. <phase>package</phase>
  356. <goals>
  357. <goal>run</goal>
  358. </goals>
  359. <configuration>
  360. <target>
  361. <echo/>
  362. <echo>Hadoop source tar available at: ${basedir}/hadoop-dist/target/hadoop-${project.version}-src.tar.gz</echo>
  363. <echo/>
  364. </target>
  365. </configuration>
  366. </execution>
  367. </executions>
  368. </plugin>
  369. </plugins>
  370. </build>
  371. </profile>
  372. <profile>
  373. <id>dist</id>
  374. <!-- Profile for generating all maven artifacts and documentation. -->
  375. <build>
  376. <plugins>
  377. <plugin>
  378. <groupId>org.apache.maven.plugins</groupId>
  379. <artifactId>maven-javadoc-plugin</artifactId>
  380. <inherited>false</inherited>
  381. <executions>
  382. <execution>
  383. <!-- build aggregate javadoc in parent only -->
  384. <id>default-cli</id>
  385. <goals>
  386. <goal>aggregate</goal>
  387. </goals>
  388. <configuration>
  389. <overview>hadoop-common-project/hadoop-common/src/main/java/overview.html</overview>
  390. </configuration>
  391. </execution>
  392. </executions>
  393. </plugin>
  394. </plugins>
  395. </build>
  396. </profile>
  397. <profile>
  398. <id>sign</id>
  399. <build>
  400. <plugins>
  401. <plugin>
  402. <groupId>org.apache.maven.plugins</groupId>
  403. <artifactId>maven-gpg-plugin</artifactId>
  404. <executions>
  405. <execution>
  406. <id>sign-artifacts</id>
  407. <phase>verify</phase>
  408. <goals>
  409. <goal>sign</goal>
  410. </goals>
  411. </execution>
  412. </executions>
  413. </plugin>
  414. </plugins>
  415. </build>
  416. </profile>
  417. <profile>
  418. <id>clover</id>
  419. <activation>
  420. <activeByDefault>false</activeByDefault>
  421. <property>
  422. <name>clover</name>
  423. </property>
  424. </activation>
  425. <properties>
  426. <cloverLicenseLocation>${user.home}/.clover.license</cloverLicenseLocation>
  427. <cloverDatabase>${project.build.directory}/clover/hadoop-coverage.db</cloverDatabase>
  428. <!-- NB: This additional parametrization is made in order
  429. to be able to re-define these properties with "-Dk=v" maven options.
  430. By some reason the expressions declared in clover
  431. docs like "${maven.clover.generateHtml}" do not work in that way.
  432. However, the below properties are confirmed to work: e.g.
  433. -DcloverGenHtml=false switches off the Html generation.
  434. The default values provided here exactly correspond to Clover defaults, so
  435. the behavior is 100% backwards compatible. -->
  436. <cloverAlwaysReport>true</cloverAlwaysReport>
  437. <cloverGenHtml>true</cloverGenHtml>
  438. <cloverGenXml>true</cloverGenXml>
  439. <cloverGenHistorical>false</cloverGenHistorical>
  440. </properties>
  441. <build>
  442. <plugins>
  443. <plugin>
  444. <groupId>com.atlassian.maven.plugins</groupId>
  445. <artifactId>maven-clover2-plugin</artifactId>
  446. <configuration>
  447. <includesAllSourceRoots>false</includesAllSourceRoots>
  448. <includesTestSourceRoots>true</includesTestSourceRoots>
  449. <licenseLocation>${cloverLicenseLocation}</licenseLocation>
  450. <cloverDatabase>${cloverDatabase}</cloverDatabase>
  451. <targetPercentage>50%</targetPercentage>
  452. <outputDirectory>${project.build.directory}/clover</outputDirectory>
  453. <alwaysReport>${cloverAlwaysReport}</alwaysReport>
  454. <generateHtml>${cloverGenHtml}</generateHtml>
  455. <generateXml>${cloverGenXml}</generateXml>
  456. <generateHistorical>${cloverGenHistorical}</generateHistorical>
  457. <excludes>
  458. <exclude>**/examples/**/*.java</exclude>
  459. <exclude>**/hamlet/*.java</exclude>
  460. <exclude>**/ha/proto/*.java</exclude>
  461. <exclude>**/protocol/proto/*.java</exclude>
  462. <exclude>**/compiler/generated/*.java</exclude>
  463. <exclude>**/protobuf/*.java</exclude>
  464. <exclude>**/v2/proto/*.java</exclude>
  465. <exclude>**/yarn/proto/*.java</exclude>
  466. <exclude>**/security/proto/*.java</exclude>
  467. <exclude>**/tools/proto/*.java</exclude>
  468. <exclude>**/hs/proto/*.java</exclude>
  469. </excludes>
  470. </configuration>
  471. <executions>
  472. <execution>
  473. <id>clover-setup</id>
  474. <phase>process-sources</phase>
  475. <goals>
  476. <goal>setup</goal>
  477. </goals>
  478. </execution>
  479. <execution>
  480. <id>clover</id>
  481. <phase>test</phase>
  482. <goals>
  483. <goal>clover</goal>
  484. </goals>
  485. </execution>
  486. </executions>
  487. </plugin>
  488. </plugins>
  489. </build>
  490. </profile>
  491. </profiles>
  492. </project>