pom.xml 34 KB

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