pom.xml 37 KB

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