pom.xml 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837
  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>3.4.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>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. <!-- required as child projects with different version can't use ${project.version} -->
  75. <hadoop.version>3.4.0-SNAPSHOT</hadoop.version>
  76. <distMgmtSnapshotsId>apache.snapshots.https</distMgmtSnapshotsId>
  77. <distMgmtSnapshotsName>Apache Development Snapshot Repository</distMgmtSnapshotsName>
  78. <distMgmtSnapshotsUrl>https://repository.apache.org/content/repositories/snapshots</distMgmtSnapshotsUrl>
  79. <distMgmtStagingId>apache.staging.https</distMgmtStagingId>
  80. <distMgmtStagingName>Apache Release Distribution Repository</distMgmtStagingName>
  81. <distMgmtStagingUrl>https://repository.apache.org/service/local/staging/deploy/maven2</distMgmtStagingUrl>
  82. <!-- platform encoding override -->
  83. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  84. <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
  85. <!-- maven plugin versions -->
  86. <maven-deploy-plugin.version>2.8.1</maven-deploy-plugin.version>
  87. <maven-site-plugin.version>3.11.0</maven-site-plugin.version>
  88. <maven-stylus-skin.version>1.5</maven-stylus-skin.version>
  89. <maven-antrun-plugin.version>1.7</maven-antrun-plugin.version>
  90. <maven-assembly-plugin.version>2.4</maven-assembly-plugin.version>
  91. <maven-dependency-plugin.version>3.0.2</maven-dependency-plugin.version>
  92. <maven-enforcer-plugin.version>3.0.0</maven-enforcer-plugin.version>
  93. <restrict-imports.enforcer.version>2.0.0</restrict-imports.enforcer.version>
  94. <maven-javadoc-plugin.version>3.0.1</maven-javadoc-plugin.version>
  95. <maven-gpg-plugin.version>1.5</maven-gpg-plugin.version>
  96. <maven-remote-resources-plugin.version>1.5</maven-remote-resources-plugin.version>
  97. <maven-resources-plugin.version>3.0.1</maven-resources-plugin.version>
  98. <apache-rat-plugin.version>0.12</apache-rat-plugin.version>
  99. <wagon-ssh.version>2.4</wagon-ssh.version>
  100. <clover-maven-plugin.version>4.4.1</clover-maven-plugin.version>
  101. <maven-bundle-plugin.version>2.5.0</maven-bundle-plugin.version>
  102. <lifecycle-mapping.version>1.0.0</lifecycle-mapping.version>
  103. <maven-checkstyle-plugin.version>3.1.0</maven-checkstyle-plugin.version>
  104. <checkstyle.version>8.29</checkstyle.version>
  105. <dependency-check-maven.version>1.4.3</dependency-check-maven.version>
  106. <spotbugs.version>4.2.2</spotbugs.version>
  107. <spotbugs-maven-plugin.version>4.2.0</spotbugs-maven-plugin.version>
  108. <jsonschema2pojo-maven-plugin.version>1.1.1</jsonschema2pojo-maven-plugin.version>
  109. <shell-executable>bash</shell-executable>
  110. <leveldbjni.group>org.fusesource.leveldbjni</leveldbjni.group>
  111. </properties>
  112. <modules>
  113. <module>hadoop-project</module>
  114. <module>hadoop-project-dist</module>
  115. <module>hadoop-assemblies</module>
  116. <module>hadoop-maven-plugins</module>
  117. <module>hadoop-common-project</module>
  118. <module>hadoop-hdfs-project</module>
  119. <module>hadoop-yarn-project</module>
  120. <module>hadoop-mapreduce-project</module>
  121. <module>hadoop-tools</module>
  122. <module>hadoop-dist</module>
  123. <module>hadoop-minicluster</module>
  124. <module>hadoop-client-modules</module>
  125. <module>hadoop-build-tools</module>
  126. <module>hadoop-cloud-storage-project</module>
  127. </modules>
  128. <build>
  129. <pluginManagement>
  130. <plugins>
  131. <plugin>
  132. <groupId>org.apache.maven.plugins</groupId>
  133. <artifactId>maven-dependency-plugin</artifactId>
  134. <version>${maven-dependency-plugin.version}</version>
  135. </plugin>
  136. <plugin>
  137. <groupId>org.apache.maven.plugins</groupId>
  138. <artifactId>maven-enforcer-plugin</artifactId>
  139. <version>${maven-enforcer-plugin.version}</version>
  140. <configuration>
  141. <rules>
  142. <requireMavenVersion>
  143. <version>[3.0.2,)</version>
  144. </requireMavenVersion>
  145. <requireJavaVersion>
  146. <version>[1.8,)</version>
  147. </requireJavaVersion>
  148. </rules>
  149. </configuration>
  150. <dependencies>
  151. <dependency>
  152. <groupId>de.skuzzle.enforcer</groupId>
  153. <artifactId>restrict-imports-enforcer-rule</artifactId>
  154. <version>${restrict-imports.enforcer.version}</version>
  155. </dependency>
  156. </dependencies>
  157. <executions>
  158. <execution>
  159. <id>banned-illegal-imports</id>
  160. <phase>process-sources</phase>
  161. <goals>
  162. <goal>enforce</goal>
  163. </goals>
  164. <configuration>
  165. <rules>
  166. <restrictImports>
  167. <includeTestCode>true</includeTestCode>
  168. <reason>Use hadoop-thirdparty shaded instead of curator shaded</reason>
  169. <bannedImports>
  170. <bannedImport>org.apache.curator.shaded.**</bannedImport>
  171. </bannedImports>
  172. </restrictImports>
  173. <restrictImports>
  174. <includeTestCode>true</includeTestCode>
  175. <reason>Use hadoop-common provided Sets rather than Guava provided Sets</reason>
  176. <bannedImports>
  177. <bannedImport>org.apache.hadoop.thirdparty.com.google.common.collect.Sets</bannedImport>
  178. <bannedImport>org.apache.hadoop.thirdparty.com.google.common.collect.Sets.**</bannedImport>
  179. </bannedImports>
  180. </restrictImports>
  181. <restrictImports>
  182. <includeTestCode>true</includeTestCode>
  183. <reason>Use hadoop-common provided Lists rather than Guava provided Lists</reason>
  184. <bannedImports>
  185. <bannedImport>org.apache.hadoop.thirdparty.com.google.common.collect.Lists</bannedImport>
  186. <bannedImport>org.apache.hadoop.thirdparty.com.google.common.collect.Lists.**</bannedImport>
  187. </bannedImports>
  188. </restrictImports>
  189. <restrictImports>
  190. <includeTestCode>true</includeTestCode>
  191. <reason>Use hadoop-annotation provided VisibleForTesting rather than the one provided by Guava</reason>
  192. <bannedImports>
  193. <bannedImport>org.apache.hadoop.thirdparty.com.google.common.annotations.VisibleForTesting</bannedImport>
  194. </bannedImports>
  195. </restrictImports>
  196. <restrictImports>
  197. <includeTestCode>true</includeTestCode>
  198. <reason>Use alternatives to Guava common classes</reason>
  199. <bannedImports>
  200. <bannedImport>com.google.common.**</bannedImport>
  201. </bannedImports>
  202. </restrictImports>
  203. <restrictImports>
  204. <includeTestCode>true</includeTestCode>
  205. <reason>Use alternative to Guava provided BaseEncoding</reason>
  206. <bannedImports>
  207. <bannedImport>org.apache.hadoop.thirdparty.com.google.common.io.BaseEncoding</bannedImport>
  208. <bannedImport>org.apache.hadoop.thirdparty.com.google.common.io.BaseEncoding.**</bannedImport>
  209. </bannedImports>
  210. </restrictImports>
  211. <restrictImports>
  212. <includeTestCode>true</includeTestCode>
  213. <reason>Use alternative to Guava provided Optional</reason>
  214. <bannedImports>
  215. <bannedImport>org.apache.hadoop.thirdparty.com.google.common.base.Optional</bannedImport>
  216. <bannedImport>org.apache.hadoop.thirdparty.com.google.common.base.Optional.**</bannedImport>
  217. </bannedImports>
  218. </restrictImports>
  219. <restrictImports>
  220. <includeTestCode>true</includeTestCode>
  221. <reason>Use alternative to Guava provided Function</reason>
  222. <bannedImports>
  223. <bannedImport>org.apache.hadoop.thirdparty.com.google.common.base.Function</bannedImport>
  224. <bannedImport>org.apache.hadoop.thirdparty.com.google.common.base.Function.**</bannedImport>
  225. </bannedImports>
  226. </restrictImports>
  227. <restrictImports>
  228. <includeTestCode>true</includeTestCode>
  229. <reason>Use alternative to Guava provided Predicate</reason>
  230. <bannedImports>
  231. <bannedImport>org.apache.hadoop.thirdparty.com.google.common.base.Predicate</bannedImport>
  232. <bannedImport>org.apache.hadoop.thirdparty.com.google.common.base.Predicate.**</bannedImport>
  233. </bannedImports>
  234. </restrictImports>
  235. <restrictImports>
  236. <includeTestCode>true</includeTestCode>
  237. <reason>Use alternative to Guava provided Supplier</reason>
  238. <bannedImports>
  239. <bannedImport>org.apache.hadoop.thirdparty.com.google.common.base.Supplier</bannedImport>
  240. <bannedImport>org.apache.hadoop.thirdparty.com.google.common.base.Supplier.**</bannedImport>
  241. </bannedImports>
  242. </restrictImports>
  243. <restrictImports>
  244. <includeTestCode>true</includeTestCode>
  245. <reason>Use alternative to Guava provided ImmutableListMultimap</reason>
  246. <bannedImports>
  247. <bannedImport>org.apache.hadoop.thirdparty.com.google.common.collect.ImmutableListMultimap</bannedImport>
  248. <bannedImport>org.apache.hadoop.thirdparty.com.google.common.collect.ImmutableListMultimap.**</bannedImport>
  249. </bannedImports>
  250. </restrictImports>
  251. <restrictImports>
  252. <includeTestCode>true</includeTestCode>
  253. <reason>Use hadoop-common provided Preconditions rather than Guava provided</reason>
  254. <bannedImports>
  255. <bannedImport>org.apache.hadoop.thirdparty.com.google.common.base.Preconditions</bannedImport>
  256. <bannedImport>org.apache.hadoop.thirdparty.com.google.common.base.Preconditions.**</bannedImport>
  257. </bannedImports>
  258. </restrictImports>
  259. <restrictImports>
  260. <includeTestCode>true</includeTestCode>
  261. <reason>Use Fasterxml Jackson 2 dependency in place of org.codehaus Jackson 1</reason>
  262. <bannedImports>
  263. <bannedImport>org.codehaus.jackson.**</bannedImport>
  264. </bannedImports>
  265. </restrictImports>
  266. </rules>
  267. </configuration>
  268. </execution>
  269. </executions>
  270. </plugin>
  271. <plugin>
  272. <groupId>org.apache.maven.plugins</groupId>
  273. <artifactId>maven-assembly-plugin</artifactId>
  274. <version>${maven-assembly-plugin.version}</version>
  275. </plugin>
  276. <plugin>
  277. <groupId>org.apache.maven.plugins</groupId>
  278. <artifactId>maven-deploy-plugin</artifactId>
  279. <version>${maven-deploy-plugin.version}</version>
  280. </plugin>
  281. <plugin>
  282. <groupId>org.apache.rat</groupId>
  283. <artifactId>apache-rat-plugin</artifactId>
  284. <version>${apache-rat-plugin.version}</version>
  285. </plugin>
  286. <plugin>
  287. <groupId>org.apache.maven.plugins</groupId>
  288. <artifactId>maven-antrun-plugin</artifactId>
  289. <version>${maven-antrun-plugin.version}</version>
  290. </plugin>
  291. <plugin>
  292. <groupId>org.apache.maven.plugins</groupId>
  293. <artifactId>maven-site-plugin</artifactId>
  294. <version>${maven-site-plugin.version}</version>
  295. <dependencies>
  296. <dependency><!-- add support for ssh/scp -->
  297. <groupId>org.apache.maven.wagon</groupId>
  298. <artifactId>wagon-ssh</artifactId>
  299. <version>${wagon-ssh.version}</version>
  300. </dependency>
  301. </dependencies>
  302. </plugin>
  303. <!--This plugin's configuration is used to store Eclipse m2e settings only.
  304. It has no influence on the Maven build itself.-->
  305. <plugin>
  306. <groupId>org.eclipse.m2e</groupId>
  307. <artifactId>lifecycle-mapping</artifactId>
  308. <version>${lifecycle-mapping.version}</version>
  309. <configuration>
  310. <lifecycleMappingMetadata>
  311. <pluginExecutions>
  312. <pluginExecution>
  313. <pluginExecutionFilter>
  314. <groupId>org.apache.maven.plugins</groupId>
  315. <artifactId>maven-antrun-plugin</artifactId>
  316. <versionRange>[1.7,)</versionRange>
  317. <goals>
  318. <goal>run</goal>
  319. </goals>
  320. </pluginExecutionFilter>
  321. <action>
  322. <ignore></ignore>
  323. </action>
  324. </pluginExecution>
  325. <pluginExecution>
  326. <pluginExecutionFilter>
  327. <groupId>org.apache.maven.plugins</groupId>
  328. <artifactId>maven-resources-plugin</artifactId>
  329. <versionRange>[2.2,)</versionRange>
  330. <goals>
  331. <goal>testResources</goal>
  332. <goal>resources</goal>
  333. </goals>
  334. </pluginExecutionFilter>
  335. <action>
  336. <ignore></ignore>
  337. </action>
  338. </pluginExecution>
  339. <pluginExecution>
  340. <pluginExecutionFilter>
  341. <groupId>org.apache.avro</groupId>
  342. <artifactId>avro-maven-plugin</artifactId>
  343. <versionRange>[1.5.3,)</versionRange>
  344. <goals>
  345. <goal>schema</goal>
  346. <goal>protocol</goal>
  347. </goals>
  348. </pluginExecutionFilter>
  349. <action>
  350. <ignore></ignore>
  351. </action>
  352. </pluginExecution>
  353. <pluginExecution>
  354. <pluginExecutionFilter>
  355. <groupId>org.codehaus.mojo.jspc</groupId>
  356. <artifactId>jspc-maven-plugin</artifactId>
  357. <versionRange>[2.0-alpha-3,)</versionRange>
  358. <goals>
  359. <goal>compile</goal>
  360. </goals>
  361. </pluginExecutionFilter>
  362. <action>
  363. <ignore></ignore>
  364. </action>
  365. </pluginExecution>
  366. <pluginExecution>
  367. <pluginExecutionFilter>
  368. <groupId>org.apache.maven.plugins</groupId>
  369. <artifactId>maven-dependency-plugin</artifactId>
  370. <versionRange>[2.4,)</versionRange>
  371. <goals>
  372. <goal>copy-dependencies</goal>
  373. <goal>build-classpath</goal>
  374. </goals>
  375. </pluginExecutionFilter>
  376. <action>
  377. <ignore></ignore>
  378. </action>
  379. </pluginExecution>
  380. <pluginExecution>
  381. <pluginExecutionFilter>
  382. <groupId>org.codehaus.mojo</groupId>
  383. <artifactId>exec-maven-plugin</artifactId>
  384. <versionRange>[1.2,)</versionRange>
  385. <goals>
  386. <goal>exec</goal>
  387. </goals>
  388. </pluginExecutionFilter>
  389. <action>
  390. <ignore></ignore>
  391. </action>
  392. </pluginExecution>
  393. <pluginExecution>
  394. <pluginExecutionFilter>
  395. <groupId>org.apache.maven.plugins</groupId>
  396. <artifactId>maven-jar-plugin</artifactId>
  397. <versionRange>[2.3.1,)</versionRange>
  398. <goals>
  399. <goal>test-jar</goal>
  400. </goals>
  401. </pluginExecutionFilter>
  402. <action>
  403. <ignore></ignore>
  404. </action>
  405. </pluginExecution>
  406. </pluginExecutions>
  407. </lifecycleMappingMetadata>
  408. </configuration>
  409. </plugin>
  410. <plugin>
  411. <groupId>org.openclover</groupId>
  412. <artifactId>clover-maven-plugin</artifactId>
  413. <version>${clover-maven-plugin.version}</version>
  414. </plugin>
  415. <plugin>
  416. <groupId>org.apache.felix</groupId>
  417. <artifactId>maven-bundle-plugin</artifactId>
  418. <version>${maven-bundle-plugin.version}</version>
  419. </plugin>
  420. <plugin>
  421. <groupId>org.apache.maven.plugins</groupId>
  422. <artifactId>maven-checkstyle-plugin</artifactId>
  423. <version>${maven-checkstyle-plugin.version}</version>
  424. <dependencies>
  425. <dependency>
  426. <groupId>org.apache.hadoop</groupId>
  427. <artifactId>hadoop-build-tools</artifactId>
  428. <version>${hadoop.version}</version>
  429. </dependency>
  430. <dependency>
  431. <groupId>com.puppycrawl.tools</groupId>
  432. <artifactId>checkstyle</artifactId>
  433. <version>${checkstyle.version}</version>
  434. </dependency>
  435. </dependencies>
  436. <configuration>
  437. <configLocation>checkstyle/checkstyle.xml</configLocation>
  438. <suppressionsLocation>checkstyle/suppressions.xml</suppressionsLocation>
  439. <includeTestSourceDirectory>true</includeTestSourceDirectory>
  440. <failOnViolation>false</failOnViolation>
  441. <outputFile>${project.build.directory}/test/checkstyle-errors.xml</outputFile>
  442. </configuration>
  443. </plugin>
  444. <plugin>
  445. <groupId>org.owasp</groupId>
  446. <artifactId>dependency-check-maven</artifactId>
  447. <version>${dependency-check-maven.version}</version>
  448. </plugin>
  449. <plugin>
  450. <groupId>com.github.spotbugs</groupId>
  451. <artifactId>spotbugs-maven-plugin</artifactId>
  452. <version>${spotbugs-maven-plugin.version}</version>
  453. <dependencies>
  454. <dependency>
  455. <groupId>com.github.spotbugs</groupId>
  456. <artifactId>spotbugs</artifactId>
  457. <version>${spotbugs.version}</version>
  458. </dependency>
  459. </dependencies>
  460. </plugin>
  461. <plugin>
  462. <groupId>org.jsonschema2pojo</groupId>
  463. <artifactId>jsonschema2pojo-maven-plugin</artifactId>
  464. <version>${jsonschema2pojo-maven-plugin.version}</version>
  465. </plugin>
  466. </plugins>
  467. </pluginManagement>
  468. <plugins>
  469. <plugin>
  470. <groupId>org.apache.maven.plugins</groupId>
  471. <artifactId>maven-enforcer-plugin</artifactId>
  472. <inherited>false</inherited>
  473. <executions>
  474. <execution>
  475. <id>clean</id>
  476. <goals>
  477. <goal>enforce</goal>
  478. </goals>
  479. <phase>pre-clean</phase>
  480. </execution>
  481. <execution>
  482. <id>default</id>
  483. <goals>
  484. <goal>enforce</goal>
  485. </goals>
  486. <phase>validate</phase>
  487. </execution>
  488. <execution>
  489. <id>site</id>
  490. <goals>
  491. <goal>enforce</goal>
  492. </goals>
  493. <phase>pre-site</phase>
  494. </execution>
  495. <execution>
  496. <id>enforce-property</id>
  497. <goals>
  498. <goal>enforce</goal>
  499. </goals>
  500. <configuration>
  501. <rules>
  502. <requireProperty>
  503. <property>hadoop.version</property>
  504. <message>You must set a hadoop.version to be the same as ${project.version}</message>
  505. <regex>${project.version}</regex>
  506. <regexMessage>The hadoop.version property should be set and should be ${project.version}.</regexMessage>
  507. </requireProperty>
  508. </rules>
  509. <fail>true</fail>
  510. </configuration>
  511. </execution>
  512. </executions>
  513. </plugin>
  514. <plugin>
  515. <groupId>org.apache.rat</groupId>
  516. <artifactId>apache-rat-plugin</artifactId>
  517. <configuration>
  518. <excludes>
  519. <exclude>.gitattributes</exclude>
  520. <exclude>.gitignore</exclude>
  521. <exclude>.git/**</exclude>
  522. <exclude>.github/pull_request_template.md</exclude>
  523. <exclude>.idea/**</exclude>
  524. <exclude>**/build/**</exclude>
  525. <exclude>**/patchprocess/**</exclude>
  526. <exclude>**/*.js</exclude>
  527. <exclude>licenses/**</exclude>
  528. <exclude>licenses-binary/**</exclude>
  529. <exclude>dev-support/docker/pkg-resolver/packages.json</exclude>
  530. <exclude>dev-support/docker/pkg-resolver/platforms.json</exclude>
  531. </excludes>
  532. </configuration>
  533. </plugin>
  534. <plugin>
  535. <artifactId>maven-site-plugin</artifactId>
  536. <executions>
  537. <execution>
  538. <id>attach-descriptor</id>
  539. <goals>
  540. <goal>attach-descriptor</goal>
  541. </goals>
  542. </execution>
  543. </executions>
  544. </plugin>
  545. <plugin>
  546. <groupId>org.apache.felix</groupId>
  547. <artifactId>maven-bundle-plugin</artifactId>
  548. <inherited>true</inherited>
  549. <extensions>true</extensions>
  550. </plugin>
  551. <plugin>
  552. <groupId>org.apache.maven.plugins</groupId>
  553. <artifactId>maven-checkstyle-plugin</artifactId>
  554. <version>${maven-checkstyle-plugin.version}</version>
  555. </plugin>
  556. <plugin>
  557. <!-- OWASP's dependency-check plugin will scan the third party
  558. dependencies of this project for known CVEs (security
  559. vulnerabilities against them). It will produce a report
  560. in target/dependency-check-report.html. To invoke, run
  561. 'mvn dependency-check:aggregate'. Note that this plugin
  562. requires maven 3.1.1 or greater.
  563. -->
  564. <groupId>org.owasp</groupId>
  565. <artifactId>dependency-check-maven</artifactId>
  566. <version>${dependency-check-maven.version}</version>
  567. </plugin>
  568. <plugin>
  569. <groupId>com.github.spotbugs</groupId>
  570. <artifactId>spotbugs-maven-plugin</artifactId>
  571. </plugin>
  572. </plugins>
  573. </build>
  574. <reporting>
  575. <excludeDefaults>true</excludeDefaults>
  576. <plugins>
  577. <plugin>
  578. <groupId>org.apache.maven.plugins</groupId>
  579. <artifactId>maven-javadoc-plugin</artifactId>
  580. <version>${maven-javadoc-plugin.version}</version>
  581. <inherited>false</inherited>
  582. <reportSets>
  583. <reportSet>
  584. <id>aggregate</id>
  585. <configuration>
  586. <maxmemory>1024m</maxmemory>
  587. <quiet>true</quiet>
  588. <verbose>false</verbose>
  589. <source>${maven.compile.source}</source>
  590. <charset>${maven.compile.encoding}</charset>
  591. <reportOutputDirectory>${project.build.directory}/site</reportOutputDirectory>
  592. <destDir>hadoop-project/api</destDir>
  593. <!-- Non-public APIs -->
  594. <excludePackageNames>org.apache.hadoop.authentication*,org.apache.hadoop.mapreduce.v2.proto,org.apache.hadoop.yarn.proto,org.apache.hadoop.yarn.server*,org.apache.hadoop.yarn.webapp*</excludePackageNames>
  595. <groups>
  596. <group>
  597. <title>Common</title>
  598. <packages>org.apache.hadoop*</packages>
  599. </group>
  600. <group>
  601. <title>HDFS</title>
  602. <packages>org.apache.hadoop.hdfs*</packages>
  603. </group>
  604. <group>
  605. <title>MapReduce</title>
  606. <packages>org.apache.hadoop.mapred*</packages>
  607. </group>
  608. <group>
  609. <title>YARN</title>
  610. <packages>org.apache.hadoop.yarn*</packages>
  611. </group>
  612. </groups>
  613. <doclet>org.apache.hadoop.classification.tools.IncludePublicAnnotationsStandardDoclet</doclet>
  614. <docletArtifacts>
  615. <docletArtifact>
  616. <groupId>org.apache.hadoop</groupId>
  617. <artifactId>hadoop-annotations</artifactId>
  618. <version>${project.version}</version>
  619. </docletArtifact>
  620. </docletArtifacts>
  621. <useStandardDocletOptions>true</useStandardDocletOptions>
  622. <!-- switch on dependency-driven aggregation -->
  623. <includeDependencySources>false</includeDependencySources>
  624. <dependencySourceIncludes>
  625. <!-- include ONLY dependencies I control -->
  626. <dependencySourceInclude>org.apache.hadoop:hadoop-annotations</dependencySourceInclude>
  627. </dependencySourceIncludes>
  628. </configuration>
  629. <reports>
  630. <report>aggregate</report>
  631. </reports>
  632. </reportSet>
  633. </reportSets>
  634. </plugin>
  635. <plugin>
  636. <groupId>org.apache.maven.plugins</groupId>
  637. <artifactId>maven-dependency-plugin</artifactId>
  638. <version>${maven-dependency-plugin.version}</version>
  639. <reportSets>
  640. <reportSet>
  641. <reports>
  642. <report>analyze-report</report>
  643. </reports>
  644. </reportSet>
  645. </reportSets>
  646. </plugin>
  647. </plugins>
  648. </reporting>
  649. <profiles>
  650. <profile>
  651. <id>src</id>
  652. <activation>
  653. <activeByDefault>false</activeByDefault>
  654. </activation>
  655. <build>
  656. <plugins>
  657. <plugin>
  658. <groupId>org.apache.maven.plugins</groupId>
  659. <artifactId>maven-assembly-plugin</artifactId>
  660. <inherited>false</inherited>
  661. <executions>
  662. <execution>
  663. <id>src-dist</id>
  664. <phase>package</phase>
  665. <goals>
  666. <goal>single</goal>
  667. </goals>
  668. <configuration>
  669. <appendAssemblyId>false</appendAssemblyId>
  670. <attach>false</attach>
  671. <finalName>hadoop-${project.version}-src</finalName>
  672. <outputDirectory>hadoop-dist/target</outputDirectory>
  673. <!-- Not using descriptorRef and hadoop-assembly dependency -->
  674. <!-- to avoid making hadoop-main to depend on a module -->
  675. <descriptors>
  676. <descriptor>hadoop-assemblies/src/main/resources/assemblies/hadoop-src.xml</descriptor>
  677. </descriptors>
  678. </configuration>
  679. </execution>
  680. </executions>
  681. </plugin>
  682. <plugin>
  683. <groupId>org.apache.maven.plugins</groupId>
  684. <artifactId>maven-antrun-plugin</artifactId>
  685. <inherited>false</inherited>
  686. <executions>
  687. <execution>
  688. <id>src-dist-msg</id>
  689. <phase>package</phase>
  690. <goals>
  691. <goal>run</goal>
  692. </goals>
  693. <configuration>
  694. <target>
  695. <echo/>
  696. <echo>Hadoop source tar available at: ${basedir}/hadoop-dist/target/hadoop-${project.version}-src.tar.gz</echo>
  697. <echo/>
  698. </target>
  699. </configuration>
  700. </execution>
  701. </executions>
  702. </plugin>
  703. </plugins>
  704. </build>
  705. </profile>
  706. <profile>
  707. <id>sign</id>
  708. <build>
  709. <plugins>
  710. <plugin>
  711. <groupId>org.apache.maven.plugins</groupId>
  712. <artifactId>maven-gpg-plugin</artifactId>
  713. <version>${maven-gpg-plugin.version}</version>
  714. <executions>
  715. <execution>
  716. <id>sign-artifacts</id>
  717. <phase>verify</phase>
  718. <goals>
  719. <goal>sign</goal>
  720. </goals>
  721. </execution>
  722. </executions>
  723. </plugin>
  724. </plugins>
  725. </build>
  726. </profile>
  727. <profile>
  728. <id>clover</id>
  729. <activation>
  730. <activeByDefault>false</activeByDefault>
  731. <property>
  732. <name>clover</name>
  733. </property>
  734. </activation>
  735. <properties>
  736. <cloverDatabase>${project.build.directory}/clover/hadoop-coverage.db</cloverDatabase>
  737. <!-- NB: This additional parametrization is made in order
  738. to be able to re-define these properties with "-Dk=v" maven options.
  739. By some reason the expressions declared in clover
  740. docs like "${maven.clover.generateHtml}" do not work in that way.
  741. However, the below properties are confirmed to work: e.g.
  742. -DcloverGenHtml=false switches off the Html generation.
  743. The default values provided here exactly correspond to Clover defaults, so
  744. the behavior is 100% backwards compatible. -->
  745. <cloverAlwaysReport>true</cloverAlwaysReport>
  746. <cloverGenHtml>true</cloverGenHtml>
  747. <cloverGenXml>true</cloverGenXml>
  748. <cloverGenHistorical>false</cloverGenHistorical>
  749. </properties>
  750. <build>
  751. <plugins>
  752. <plugin>
  753. <groupId>org.openclover</groupId>
  754. <artifactId>clover-maven-plugin</artifactId>
  755. <configuration>
  756. <includesAllSourceRoots>false</includesAllSourceRoots>
  757. <includesTestSourceRoots>true</includesTestSourceRoots>
  758. <cloverDatabase>${cloverDatabase}</cloverDatabase>
  759. <targetPercentage>50%</targetPercentage>
  760. <outputDirectory>${project.build.directory}/clover</outputDirectory>
  761. <alwaysReport>${cloverAlwaysReport}</alwaysReport>
  762. <generateHtml>${cloverGenHtml}</generateHtml>
  763. <generateXml>${cloverGenXml}</generateXml>
  764. <generateHistorical>${cloverGenHistorical}</generateHistorical>
  765. <excludes>
  766. <exclude>**/examples/**/*.java</exclude>
  767. <exclude>**/hamlet/*.java</exclude>
  768. <exclude>**/ha/proto/*.java</exclude>
  769. <exclude>**/protocol/proto/*.java</exclude>
  770. <exclude>**/compiler/generated/*.java</exclude>
  771. <exclude>**/protobuf/*.java</exclude>
  772. <exclude>**/v2/proto/*.java</exclude>
  773. <exclude>**/yarn/proto/*.java</exclude>
  774. <exclude>**/security/proto/*.java</exclude>
  775. <exclude>**/tools/proto/*.java</exclude>
  776. <exclude>**/hs/proto/*.java</exclude>
  777. </excludes>
  778. </configuration>
  779. <executions>
  780. <execution>
  781. <id>clover-setup</id>
  782. <phase>process-sources</phase>
  783. <goals>
  784. <goal>setup</goal>
  785. </goals>
  786. </execution>
  787. <execution>
  788. <id>clover</id>
  789. <phase>test</phase>
  790. <goals>
  791. <goal>clover</goal>
  792. </goals>
  793. </execution>
  794. </executions>
  795. </plugin>
  796. </plugins>
  797. </build>
  798. </profile>
  799. <profile>
  800. <id>aarch64</id>
  801. <properties>
  802. <leveldbjni.group>org.openlabtesting.leveldbjni</leveldbjni.group>
  803. </properties>
  804. <activation>
  805. <os>
  806. <family>linux</family>
  807. <arch>aarch64</arch>
  808. </os>
  809. </activation>
  810. </profile>
  811. </profiles>
  812. </project>