pom.xml 20 KB

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