pom.xml 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502
  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.4.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>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. </excludes>
  209. </configuration>
  210. </plugin>
  211. <plugin>
  212. <artifactId>maven-site-plugin</artifactId>
  213. <version>3.3</version>
  214. <executions>
  215. <execution>
  216. <id>attach-descriptor</id>
  217. <goals>
  218. <goal>attach-descriptor</goal>
  219. </goals>
  220. <configuration>
  221. <generateReports>true</generateReports>
  222. </configuration>
  223. </execution>
  224. </executions>
  225. </plugin>
  226. <plugin>
  227. <groupId>org.apache.felix</groupId>
  228. <artifactId>maven-bundle-plugin</artifactId>
  229. <inherited>true</inherited>
  230. <extensions>true</extensions>
  231. </plugin>
  232. </plugins>
  233. </build>
  234. <reporting>
  235. <excludeDefaults>true</excludeDefaults>
  236. <plugins>
  237. <plugin>
  238. <groupId>org.apache.maven.plugins</groupId>
  239. <artifactId>maven-javadoc-plugin</artifactId>
  240. <version>2.8.1</version>
  241. <inherited>false</inherited>
  242. <reportSets>
  243. <reportSet>
  244. <id>aggregate</id>
  245. <configuration>
  246. <maxmemory>1024m</maxmemory>
  247. <linksource>true</linksource>
  248. <quiet>true</quiet>
  249. <verbose>false</verbose>
  250. <source>${maven.compile.source}</source>
  251. <charset>${maven.compile.encoding}</charset>
  252. <reportOutputDirectory>${project.build.directory}/site</reportOutputDirectory>
  253. <destDir>hadoop-project/api</destDir>
  254. <!-- Non-public APIs -->
  255. <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>
  256. <groups>
  257. <group>
  258. <title>Common</title>
  259. <packages>org.apache.hadoop*</packages>
  260. </group>
  261. <group>
  262. <title>MapReduce</title>
  263. <packages>org.apache.hadoop.mapred*</packages>
  264. </group>
  265. <group>
  266. <title>YARN</title>
  267. <packages>org.apache.hadoop.yarn*</packages>
  268. </group>
  269. </groups>
  270. <doclet>org.apache.hadoop.classification.tools.IncludePublicAnnotationsStandardDoclet</doclet>
  271. <docletArtifacts>
  272. <docletArtifact>
  273. <groupId>org.apache.hadoop</groupId>
  274. <artifactId>hadoop-annotations</artifactId>
  275. <version>${project.version}</version>
  276. </docletArtifact>
  277. </docletArtifacts>
  278. <useStandardDocletOptions>true</useStandardDocletOptions>
  279. <!-- switch on dependency-driven aggregation -->
  280. <includeDependencySources>false</includeDependencySources>
  281. <dependencySourceIncludes>
  282. <!-- include ONLY dependencies I control -->
  283. <dependencySourceInclude>org.apache.hadoop:hadoop-annotations</dependencySourceInclude>
  284. </dependencySourceIncludes>
  285. </configuration>
  286. <reports>
  287. <report>aggregate</report>
  288. </reports>
  289. </reportSet>
  290. </reportSets>
  291. </plugin>
  292. <plugin>
  293. <groupId>org.apache.maven.plugins</groupId>
  294. <artifactId>maven-dependency-plugin</artifactId>
  295. <version>2.4</version>
  296. <reportSets>
  297. <reportSet>
  298. <reports>
  299. <report>analyze-report</report>
  300. </reports>
  301. </reportSet>
  302. </reportSets>
  303. </plugin>
  304. </plugins>
  305. </reporting>
  306. <profiles>
  307. <profile>
  308. <id>src</id>
  309. <activation>
  310. <activeByDefault>false</activeByDefault>
  311. </activation>
  312. <build>
  313. <plugins>
  314. <plugin>
  315. <groupId>org.apache.maven.plugins</groupId>
  316. <artifactId>maven-assembly-plugin</artifactId>
  317. <inherited>false</inherited>
  318. <executions>
  319. <execution>
  320. <id>src-dist</id>
  321. <phase>package</phase>
  322. <goals>
  323. <goal>single</goal>
  324. </goals>
  325. <configuration>
  326. <appendAssemblyId>false</appendAssemblyId>
  327. <attach>false</attach>
  328. <finalName>hadoop-${project.version}-src</finalName>
  329. <outputDirectory>hadoop-dist/target</outputDirectory>
  330. <!-- Not using descriptorRef and hadoop-assembly dependency -->
  331. <!-- to avoid making hadoop-main to depend on a module -->
  332. <descriptors>
  333. <descriptor>hadoop-assemblies/src/main/resources/assemblies/hadoop-src.xml</descriptor>
  334. </descriptors>
  335. </configuration>
  336. </execution>
  337. </executions>
  338. </plugin>
  339. <plugin>
  340. <groupId>org.apache.maven.plugins</groupId>
  341. <artifactId>maven-antrun-plugin</artifactId>
  342. <inherited>false</inherited>
  343. <executions>
  344. <execution>
  345. <id>src-dist-msg</id>
  346. <phase>package</phase>
  347. <goals>
  348. <goal>run</goal>
  349. </goals>
  350. <configuration>
  351. <target>
  352. <echo/>
  353. <echo>Hadoop source tar available at: ${basedir}/hadoop-dist/target/hadoop-${project.version}-src.tar.gz</echo>
  354. <echo/>
  355. </target>
  356. </configuration>
  357. </execution>
  358. </executions>
  359. </plugin>
  360. </plugins>
  361. </build>
  362. </profile>
  363. <profile>
  364. <id>dist</id>
  365. <!-- Profile for generating all maven artifacts and documentation. -->
  366. <build>
  367. <plugins>
  368. <plugin>
  369. <groupId>org.apache.maven.plugins</groupId>
  370. <artifactId>maven-javadoc-plugin</artifactId>
  371. <inherited>false</inherited>
  372. <executions>
  373. <execution>
  374. <!-- build aggregate javadoc in parent only -->
  375. <id>default-cli</id>
  376. <goals>
  377. <goal>aggregate</goal>
  378. </goals>
  379. <configuration>
  380. <overview>hadoop-common-project/hadoop-common/src/main/java/overview.html</overview>
  381. </configuration>
  382. </execution>
  383. </executions>
  384. </plugin>
  385. </plugins>
  386. </build>
  387. </profile>
  388. <profile>
  389. <id>sign</id>
  390. <build>
  391. <plugins>
  392. <plugin>
  393. <groupId>org.apache.maven.plugins</groupId>
  394. <artifactId>maven-gpg-plugin</artifactId>
  395. <executions>
  396. <execution>
  397. <id>sign-artifacts</id>
  398. <phase>verify</phase>
  399. <goals>
  400. <goal>sign</goal>
  401. </goals>
  402. </execution>
  403. </executions>
  404. </plugin>
  405. </plugins>
  406. </build>
  407. </profile>
  408. <profile>
  409. <id>clover</id>
  410. <activation>
  411. <activeByDefault>false</activeByDefault>
  412. <property>
  413. <name>clover</name>
  414. </property>
  415. </activation>
  416. <properties>
  417. <cloverLicenseLocation>${user.home}/.clover.license</cloverLicenseLocation>
  418. <cloverDatabase>${project.build.directory}/clover/hadoop-coverage.db</cloverDatabase>
  419. <!-- NB: This additional parametrization is made in order
  420. to be able to re-define these properties with "-Dk=v" maven options.
  421. By some reason the expressions declared in clover
  422. docs like "${maven.clover.generateHtml}" do not work in that way.
  423. However, the below properties are confirmed to work: e.g.
  424. -DcloverGenHtml=false switches off the Html generation.
  425. The default values provided here exactly correspond to Clover defaults, so
  426. the behavior is 100% backwards compatible. -->
  427. <cloverAlwaysReport>true</cloverAlwaysReport>
  428. <cloverGenHtml>true</cloverGenHtml>
  429. <cloverGenXml>true</cloverGenXml>
  430. <cloverGenHistorical>false</cloverGenHistorical>
  431. </properties>
  432. <build>
  433. <plugins>
  434. <plugin>
  435. <groupId>com.atlassian.maven.plugins</groupId>
  436. <artifactId>maven-clover2-plugin</artifactId>
  437. <configuration>
  438. <includesAllSourceRoots>false</includesAllSourceRoots>
  439. <includesTestSourceRoots>true</includesTestSourceRoots>
  440. <licenseLocation>${cloverLicenseLocation}</licenseLocation>
  441. <cloverDatabase>${cloverDatabase}</cloverDatabase>
  442. <targetPercentage>50%</targetPercentage>
  443. <outputDirectory>${project.build.directory}/clover</outputDirectory>
  444. <alwaysReport>${cloverAlwaysReport}</alwaysReport>
  445. <generateHtml>${cloverGenHtml}</generateHtml>
  446. <generateXml>${cloverGenXml}</generateXml>
  447. <generateHistorical>${cloverGenHistorical}</generateHistorical>
  448. <excludes>
  449. <exclude>**/examples/**/*.java</exclude>
  450. <exclude>**/hamlet/*.java</exclude>
  451. <exclude>**/ha/proto/*.java</exclude>
  452. <exclude>**/protocol/proto/*.java</exclude>
  453. <exclude>**/compiler/generated/*.java</exclude>
  454. <exclude>**/protobuf/*.java</exclude>
  455. <exclude>**/v2/proto/*.java</exclude>
  456. <exclude>**/yarn/proto/*.java</exclude>
  457. <exclude>**/security/proto/*.java</exclude>
  458. <exclude>**/tools/proto/*.java</exclude>
  459. <exclude>**/hs/proto/*.java</exclude>
  460. </excludes>
  461. </configuration>
  462. <executions>
  463. <execution>
  464. <id>clover-setup</id>
  465. <phase>process-sources</phase>
  466. <goals>
  467. <goal>setup</goal>
  468. </goals>
  469. </execution>
  470. <execution>
  471. <id>clover</id>
  472. <phase>test</phase>
  473. <goals>
  474. <goal>clover</goal>
  475. </goals>
  476. </execution>
  477. </executions>
  478. </plugin>
  479. </plugins>
  480. </build>
  481. </profile>
  482. </profiles>
  483. </project>