pom.xml 18 KB

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