pom.xml 37 KB

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