pom.xml 18 KB

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