pom.xml 20 KB

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