pom.xml 17 KB

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