pom.xml 17 KB

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