pom.xml 42 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180
  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
  16. https://maven.apache.org/xsd/maven-4.0.0.xsd">
  17. <modelVersion>4.0.0</modelVersion>
  18. <parent>
  19. <groupId>org.apache.hadoop</groupId>
  20. <artifactId>hadoop-project-dist</artifactId>
  21. <version>3.3.5</version>
  22. <relativePath>../../hadoop-project-dist</relativePath>
  23. </parent>
  24. <artifactId>hadoop-common</artifactId>
  25. <version>3.3.5</version>
  26. <description>Apache Hadoop Common</description>
  27. <name>Apache Hadoop Common</name>
  28. <packaging>jar</packaging>
  29. <properties>
  30. <hadoop.component>common</hadoop.component>
  31. <is.hadoop.component>true</is.hadoop.component>
  32. <is.hadoop.common.component>true</is.hadoop.common.component>
  33. <wsce.config.dir>../etc/hadoop</wsce.config.dir>
  34. <wsce.config.file>wsce-site.xml</wsce.config.file>
  35. </properties>
  36. <dependencies>
  37. <dependency>
  38. <groupId>org.apache.hadoop.thirdparty</groupId>
  39. <artifactId>hadoop-shaded-protobuf_3_7</artifactId>
  40. </dependency>
  41. <dependency>
  42. <groupId>org.apache.hadoop</groupId>
  43. <artifactId>hadoop-annotations</artifactId>
  44. <scope>compile</scope>
  45. </dependency>
  46. <dependency>
  47. <groupId>org.apache.hadoop.thirdparty</groupId>
  48. <artifactId>hadoop-shaded-guava</artifactId>
  49. </dependency>
  50. <!--Guava is required during runtime for curator-->
  51. <dependency>
  52. <groupId>com.google.guava</groupId>
  53. <artifactId>guava</artifactId>
  54. <scope>compile</scope>
  55. </dependency>
  56. <dependency>
  57. <groupId>commons-cli</groupId>
  58. <artifactId>commons-cli</artifactId>
  59. <scope>compile</scope>
  60. </dependency>
  61. <dependency>
  62. <groupId>org.apache.commons</groupId>
  63. <artifactId>commons-math3</artifactId>
  64. <scope>compile</scope>
  65. </dependency>
  66. <dependency>
  67. <groupId>org.apache.httpcomponents</groupId>
  68. <artifactId>httpclient</artifactId>
  69. <scope>compile</scope>
  70. </dependency>
  71. <dependency>
  72. <groupId>commons-codec</groupId>
  73. <artifactId>commons-codec</artifactId>
  74. <scope>compile</scope>
  75. </dependency>
  76. <dependency>
  77. <groupId>commons-io</groupId>
  78. <artifactId>commons-io</artifactId>
  79. <scope>compile</scope>
  80. </dependency>
  81. <dependency>
  82. <groupId>commons-net</groupId>
  83. <artifactId>commons-net</artifactId>
  84. <scope>compile</scope>
  85. </dependency>
  86. <dependency>
  87. <groupId>commons-collections</groupId>
  88. <artifactId>commons-collections</artifactId>
  89. <scope>compile</scope>
  90. </dependency>
  91. <dependency>
  92. <groupId>javax.servlet</groupId>
  93. <artifactId>javax.servlet-api</artifactId>
  94. <scope>compile</scope>
  95. </dependency>
  96. <dependency>
  97. <groupId>jakarta.activation</groupId>
  98. <artifactId>jakarta.activation-api</artifactId>
  99. <scope>runtime</scope>
  100. </dependency>
  101. <dependency>
  102. <groupId>org.eclipse.jetty</groupId>
  103. <artifactId>jetty-server</artifactId>
  104. <scope>compile</scope>
  105. </dependency>
  106. <dependency>
  107. <groupId>org.eclipse.jetty</groupId>
  108. <artifactId>jetty-util</artifactId>
  109. <scope>compile</scope>
  110. </dependency>
  111. <dependency>
  112. <groupId>org.eclipse.jetty</groupId>
  113. <artifactId>jetty-servlet</artifactId>
  114. <scope>compile</scope>
  115. </dependency>
  116. <dependency>
  117. <groupId>org.eclipse.jetty</groupId>
  118. <artifactId>jetty-webapp</artifactId>
  119. <scope>compile</scope>
  120. </dependency>
  121. <dependency>
  122. <groupId>org.eclipse.jetty</groupId>
  123. <artifactId>jetty-util-ajax</artifactId>
  124. <scope>test</scope>
  125. </dependency>
  126. <dependency>
  127. <groupId>javax.servlet.jsp</groupId>
  128. <artifactId>jsp-api</artifactId>
  129. <scope>runtime</scope>
  130. </dependency>
  131. <dependency>
  132. <groupId>com.sun.jersey</groupId>
  133. <artifactId>jersey-core</artifactId>
  134. <scope>compile</scope>
  135. </dependency>
  136. <dependency>
  137. <groupId>com.sun.jersey</groupId>
  138. <artifactId>jersey-servlet</artifactId>
  139. <scope>compile</scope>
  140. <exclusions>
  141. <exclusion>
  142. <groupId>javax.enterprise</groupId>
  143. <artifactId>cdi-api</artifactId>
  144. </exclusion>
  145. <exclusion>
  146. <groupId>javax.servlet</groupId>
  147. <artifactId>servlet-api</artifactId>
  148. </exclusion>
  149. <exclusion>
  150. <groupId>ch.qos.cal10n</groupId>
  151. <artifactId>cal10n-api</artifactId>
  152. </exclusion>
  153. </exclusions>
  154. </dependency>
  155. <dependency>
  156. <groupId>com.github.pjfanning</groupId>
  157. <artifactId>jersey-json</artifactId>
  158. <scope>compile</scope>
  159. <exclusions>
  160. <exclusion>
  161. <groupId>com.fasterxml.jackson.core</groupId>
  162. <artifactId>jackson-core</artifactId>
  163. </exclusion>
  164. <exclusion>
  165. <groupId>com.fasterxml.jackson.core</groupId>
  166. <artifactId>jackson-databind</artifactId>
  167. </exclusion>
  168. <exclusion>
  169. <groupId>com.fasterxml.jackson.jaxrs</groupId>
  170. <artifactId>jackson-jaxrs-json-provider</artifactId>
  171. </exclusion>
  172. </exclusions>
  173. </dependency>
  174. <dependency>
  175. <groupId>com.sun.jersey</groupId>
  176. <artifactId>jersey-server</artifactId>
  177. <scope>compile</scope>
  178. </dependency>
  179. <dependency>
  180. <groupId>commons-logging</groupId>
  181. <artifactId>commons-logging</artifactId>
  182. <scope>compile</scope>
  183. </dependency>
  184. <dependency>
  185. <groupId>ch.qos.reload4j</groupId>
  186. <artifactId>reload4j</artifactId>
  187. <scope>compile</scope>
  188. </dependency>
  189. <dependency>
  190. <groupId>junit</groupId>
  191. <artifactId>junit</artifactId>
  192. <scope>test</scope>
  193. </dependency>
  194. <dependency>
  195. <groupId>org.assertj</groupId>
  196. <artifactId>assertj-core</artifactId>
  197. <scope>test</scope>
  198. </dependency>
  199. <dependency>
  200. <groupId>org.glassfish.grizzly</groupId>
  201. <artifactId>grizzly-http-servlet</artifactId>
  202. <scope>test</scope>
  203. </dependency>
  204. <dependency>
  205. <groupId>commons-beanutils</groupId>
  206. <artifactId>commons-beanutils</artifactId>
  207. <scope>compile</scope>
  208. </dependency>
  209. <dependency>
  210. <groupId>org.apache.commons</groupId>
  211. <artifactId>commons-configuration2</artifactId>
  212. <scope>compile</scope>
  213. </dependency>
  214. <dependency>
  215. <groupId>org.apache.commons</groupId>
  216. <artifactId>commons-lang3</artifactId>
  217. <scope>compile</scope>
  218. </dependency>
  219. <dependency>
  220. <groupId>org.apache.commons</groupId>
  221. <artifactId>commons-text</artifactId>
  222. <scope>compile</scope>
  223. </dependency>
  224. <dependency>
  225. <groupId>org.slf4j</groupId>
  226. <artifactId>slf4j-api</artifactId>
  227. <scope>compile</scope>
  228. </dependency>
  229. <dependency>
  230. <groupId>org.slf4j</groupId>
  231. <artifactId>slf4j-reload4j</artifactId>
  232. <scope>compile</scope>
  233. </dependency>
  234. <dependency>
  235. <groupId>org.mockito</groupId>
  236. <artifactId>mockito-core</artifactId>
  237. <scope>test</scope>
  238. </dependency>
  239. <dependency>
  240. <groupId>org.apache.avro</groupId>
  241. <artifactId>avro</artifactId>
  242. <scope>compile</scope>
  243. </dependency>
  244. <dependency>
  245. <groupId>org.apache.ant</groupId>
  246. <artifactId>ant</artifactId>
  247. <scope>test</scope>
  248. </dependency>
  249. <dependency>
  250. <groupId>com.google.re2j</groupId>
  251. <artifactId>re2j</artifactId>
  252. <scope>compile</scope>
  253. </dependency>
  254. <dependency>
  255. <groupId>com.google.protobuf</groupId>
  256. <artifactId>protobuf-java</artifactId>
  257. <scope>compile</scope>
  258. </dependency>
  259. <dependency>
  260. <groupId>com.google.code.gson</groupId>
  261. <artifactId>gson</artifactId>
  262. </dependency>
  263. <dependency>
  264. <groupId>org.apache.hadoop</groupId>
  265. <artifactId>hadoop-auth</artifactId>
  266. <scope>compile</scope>
  267. </dependency>
  268. <dependency>
  269. <groupId>org.apache.hadoop</groupId>
  270. <artifactId>hadoop-auth</artifactId>
  271. <type>test-jar</type>
  272. <scope>test</scope>
  273. </dependency>
  274. <dependency>
  275. <groupId>org.apache.hadoop</groupId>
  276. <artifactId>hadoop-minikdc</artifactId>
  277. <scope>test</scope>
  278. </dependency>
  279. <dependency>
  280. <groupId>com.jcraft</groupId>
  281. <artifactId>jsch</artifactId>
  282. </dependency>
  283. <dependency>
  284. <groupId>org.apache.curator</groupId>
  285. <artifactId>curator-test</artifactId>
  286. <scope>test</scope>
  287. </dependency>
  288. <dependency>
  289. <groupId>org.apache.curator</groupId>
  290. <artifactId>curator-client</artifactId>
  291. </dependency>
  292. <dependency>
  293. <groupId>org.apache.curator</groupId>
  294. <artifactId>curator-recipes</artifactId>
  295. </dependency>
  296. <dependency>
  297. <groupId>com.google.code.findbugs</groupId>
  298. <artifactId>jsr305</artifactId>
  299. <scope>compile</scope>
  300. </dependency>
  301. <dependency>
  302. <groupId>org.apache.sshd</groupId>
  303. <artifactId>sshd-core</artifactId>
  304. <scope>test</scope>
  305. </dependency>
  306. <dependency>
  307. <groupId>org.apache.ftpserver</groupId>
  308. <artifactId>ftpserver-core</artifactId>
  309. <scope>test</scope>
  310. </dependency>
  311. <dependency>
  312. <groupId>org.apache.zookeeper</groupId>
  313. <artifactId>zookeeper</artifactId>
  314. <exclusions>
  315. <exclusion>
  316. <groupId>org.jboss.netty</groupId>
  317. <artifactId>netty</artifactId>
  318. </exclusion>
  319. <exclusion>
  320. <!-- otherwise seems to drag in junit 3.8.1 via jline -->
  321. <groupId>junit</groupId>
  322. <artifactId>junit</artifactId>
  323. </exclusion>
  324. <exclusion>
  325. <groupId>com.sun.jdmk</groupId>
  326. <artifactId>jmxtools</artifactId>
  327. </exclusion>
  328. <exclusion>
  329. <groupId>com.sun.jmx</groupId>
  330. <artifactId>jmxri</artifactId>
  331. </exclusion>
  332. </exclusions>
  333. </dependency>
  334. <dependency>
  335. <groupId>org.apache.zookeeper</groupId>
  336. <artifactId>zookeeper</artifactId>
  337. <type>test-jar</type>
  338. <scope>test</scope>
  339. </dependency>
  340. <dependency>
  341. <groupId>org.apache.commons</groupId>
  342. <artifactId>commons-compress</artifactId>
  343. </dependency>
  344. <dependency>
  345. <groupId>org.bouncycastle</groupId>
  346. <artifactId>bcprov-jdk15on</artifactId>
  347. <scope>test</scope>
  348. </dependency>
  349. <dependency>
  350. <groupId>org.apache.kerby</groupId>
  351. <artifactId>kerb-core</artifactId>
  352. </dependency>
  353. <dependency>
  354. <groupId>com.fasterxml.jackson.core</groupId>
  355. <artifactId>jackson-databind</artifactId>
  356. </dependency>
  357. <dependency>
  358. <groupId>org.codehaus.woodstox</groupId>
  359. <artifactId>stax2-api</artifactId>
  360. <scope>compile</scope>
  361. </dependency>
  362. <dependency>
  363. <groupId>com.fasterxml.woodstox</groupId>
  364. <artifactId>woodstox-core</artifactId>
  365. <scope>compile</scope>
  366. </dependency>
  367. <dependency>
  368. <groupId>com.squareup.okhttp3</groupId>
  369. <artifactId>mockwebserver</artifactId>
  370. <scope>test</scope>
  371. </dependency>
  372. <dependency>
  373. <groupId>dnsjava</groupId>
  374. <artifactId>dnsjava</artifactId>
  375. <scope>compile</scope>
  376. </dependency>
  377. <dependency>
  378. <groupId>org.wildfly.openssl</groupId>
  379. <artifactId>wildfly-openssl</artifactId>
  380. <scope>test</scope>
  381. </dependency>
  382. <dependency>
  383. <groupId>org.wildfly.openssl</groupId>
  384. <artifactId>wildfly-openssl-java</artifactId>
  385. <scope>provided</scope>
  386. </dependency>
  387. <dependency>
  388. <groupId>org.xerial.snappy</groupId>
  389. <artifactId>snappy-java</artifactId>
  390. <scope>compile</scope>
  391. </dependency>
  392. <dependency>
  393. <groupId>org.lz4</groupId>
  394. <artifactId>lz4-java</artifactId>
  395. <scope>provided</scope>
  396. </dependency>
  397. </dependencies>
  398. <build>
  399. <!--
  400. Include all files in src/main/resources. By default, do not apply property
  401. substitution (filtering=false), but do apply property substitution to
  402. common-version-info.properties (filtering=true). This will substitute the
  403. version information correctly, but prevent Maven from altering other files
  404. like core-default.xml.
  405. -->
  406. <resources>
  407. <resource>
  408. <directory>${basedir}/src/main/resources</directory>
  409. <excludes>
  410. <exclude>common-version-info.properties</exclude>
  411. </excludes>
  412. <filtering>false</filtering>
  413. </resource>
  414. <resource>
  415. <directory>${basedir}/src/main/resources</directory>
  416. <includes>
  417. <include>common-version-info.properties</include>
  418. </includes>
  419. <filtering>true</filtering>
  420. </resource>
  421. </resources>
  422. <plugins>
  423. <plugin>
  424. <groupId>org.xolstice.maven.plugins</groupId>
  425. <artifactId>protobuf-maven-plugin</artifactId>
  426. <executions>
  427. <execution>
  428. <id>src-compile-protoc</id>
  429. <configuration>
  430. <skip>false</skip>
  431. <excludes>
  432. <exclude>ProtobufRpcEngine.proto</exclude>
  433. </excludes>
  434. </configuration>
  435. </execution>
  436. <execution>
  437. <id>src-test-compile-protoc</id>
  438. <configuration>
  439. <skip>false</skip>
  440. <excludes>
  441. <exclude>*legacy.proto</exclude>
  442. </excludes>
  443. </configuration>
  444. </execution>
  445. </executions>
  446. </plugin>
  447. <plugin>
  448. <groupId>com.google.code.maven-replacer-plugin</groupId>
  449. <artifactId>replacer</artifactId>
  450. <executions>
  451. <execution>
  452. <id>replace-generated-sources</id>
  453. <configuration>
  454. <skip>false</skip>
  455. <excludes>
  456. <exclude>**/ProtobufRpcEngineProtos.java</exclude>
  457. </excludes>
  458. </configuration>
  459. </execution>
  460. <execution>
  461. <id>replace-generated-test-sources</id>
  462. <configuration>
  463. <skip>false</skip>
  464. <excludes>
  465. <exclude>**/TestProtosLegacy.java</exclude>
  466. <exclude>**/TestRpcServiceProtosLegacy.java</exclude>
  467. </excludes>
  468. </configuration>
  469. </execution>
  470. <execution>
  471. <id>replace-sources</id>
  472. <configuration>
  473. <skip>false</skip>
  474. <!--These classes have direct Protobuf references for backward compatibility reasons-->
  475. <excludes>
  476. <exclude>**/ProtobufHelper.java</exclude>
  477. <exclude>**/RpcWritable.java</exclude>
  478. <exclude>**/ProtobufRpcEngineCallback.java</exclude>
  479. <exclude>**/ProtobufRpcEngine.java</exclude>
  480. <exclude>**/ProtobufRpcEngine2.java</exclude>
  481. <exclude>**/ProtobufRpcEngineProtos.java</exclude>
  482. </excludes>
  483. </configuration>
  484. </execution>
  485. <execution>
  486. <id>replace-test-sources</id>
  487. <configuration>
  488. <skip>false</skip>
  489. <excludes>
  490. <exclude>**/TestProtoBufRpc.java</exclude>
  491. </excludes>
  492. </configuration>
  493. </execution>
  494. </executions>
  495. </plugin>
  496. <plugin>
  497. <groupId>org.apache.hadoop</groupId>
  498. <artifactId>hadoop-maven-plugins</artifactId>
  499. <executions>
  500. <execution>
  501. <id>version-info</id>
  502. <phase>generate-resources</phase>
  503. <goals>
  504. <goal>version-info</goal>
  505. </goals>
  506. <configuration>
  507. <source>
  508. <directory>${basedir}/src/main</directory>
  509. <includes>
  510. <include>java/**/*.java</include>
  511. <include>proto/**/*.proto</include>
  512. </includes>
  513. </source>
  514. </configuration>
  515. </execution>
  516. <execution>
  517. <id>resource-gz</id>
  518. <phase>generate-resources</phase>
  519. <goals>
  520. <goal>resource-gz</goal>
  521. </goals>
  522. <configuration>
  523. <inputDirectory>${basedir}/src/main/webapps/static</inputDirectory>
  524. <outputDirectory>${basedir}/target/webapps/static</outputDirectory>
  525. <extensions>js,css</extensions>
  526. </configuration>
  527. </execution>
  528. </executions>
  529. </plugin>
  530. <plugin>
  531. <groupId>org.apache.maven.plugins</groupId>
  532. <artifactId>maven-surefire-plugin</artifactId>
  533. <configuration>
  534. <systemPropertyVariables>
  535. <runningWithNative>${runningWithNative}</runningWithNative>
  536. </systemPropertyVariables>
  537. <properties>
  538. <property>
  539. <name>listener</name>
  540. <value>org.apache.hadoop.test.TimedOutTestsListener</value>
  541. </property>
  542. </properties>
  543. </configuration>
  544. </plugin>
  545. <plugin>
  546. <groupId>org.apache.avro</groupId>
  547. <artifactId>avro-maven-plugin</artifactId>
  548. <executions>
  549. <execution>
  550. <id>generate-avro-test-sources</id>
  551. <phase>generate-test-sources</phase>
  552. <goals>
  553. <goal>schema</goal>
  554. </goals>
  555. </execution>
  556. </executions>
  557. <configuration>
  558. <testOutputDirectory>${project.build.directory}/generated-test-sources/java</testOutputDirectory>
  559. </configuration>
  560. </plugin>
  561. <plugin>
  562. <groupId>org.apache.maven.plugins</groupId>
  563. <artifactId>maven-antrun-plugin</artifactId>
  564. <executions>
  565. <execution>
  566. <id>create-log-dir</id>
  567. <phase>process-test-resources</phase>
  568. <goals>
  569. <goal>run</goal>
  570. </goals>
  571. <configuration>
  572. <target>
  573. <!--
  574. TODO: there are tests (TestLocalFileSystem#testCopy) that fail if data
  575. TODO: from a previous run is present
  576. -->
  577. <delete dir="${test.build.data}"/>
  578. <mkdir dir="${test.build.data}"/>
  579. <mkdir dir="${hadoop.log.dir}"/>
  580. <copy toDir="${project.build.directory}/test-classes">
  581. <fileset dir="${basedir}/src/main/conf"/>
  582. </copy>
  583. </target>
  584. </configuration>
  585. </execution>
  586. <execution>
  587. <phase>pre-site</phase>
  588. <goals>
  589. <goal>run</goal>
  590. </goals>
  591. <configuration>
  592. <target>
  593. <copy file="src/main/resources/core-default.xml" todir="src/site/resources"/>
  594. <copy file="src/main/xsl/configuration.xsl" todir="src/site/resources"/>
  595. </target>
  596. </configuration>
  597. </execution>
  598. </executions>
  599. </plugin>
  600. <plugin>
  601. <groupId>org.apache.rat</groupId>
  602. <artifactId>apache-rat-plugin</artifactId>
  603. <configuration>
  604. <excludes>
  605. <exclude>.idea/**</exclude>
  606. <exclude>src/main/conf/*</exclude>
  607. <exclude>dev-support/jdiff/**</exclude>
  608. <exclude>src/main/native/*</exclude>
  609. <exclude>src/main/native/config/*</exclude>
  610. <exclude>src/main/native/m4/*</exclude>
  611. <exclude>src/test/empty-file</exclude>
  612. <exclude>src/test/all-tests</exclude>
  613. <exclude>src/main/native/gtest/**/*</exclude>
  614. <exclude>src/test/resources/test-untar.tgz</exclude>
  615. <exclude>src/test/resources/test.har/_SUCCESS</exclude>
  616. <exclude>src/test/resources/test.har/_index</exclude>
  617. <exclude>src/test/resources/test.har/_masterindex</exclude>
  618. <exclude>src/test/resources/test.har/part-0</exclude>
  619. <exclude>src/test/resources/javakeystoreprovider.password</exclude>
  620. <exclude>dev-support/jdiff-workaround.patch</exclude>
  621. </excludes>
  622. </configuration>
  623. </plugin>
  624. <plugin>
  625. <groupId>org.codehaus.mojo</groupId>
  626. <artifactId>exec-maven-plugin</artifactId>
  627. <executions>
  628. <execution>
  629. <id>shelldocs</id>
  630. <phase>pre-site</phase>
  631. <goals>
  632. <goal>exec</goal>
  633. </goals>
  634. <configuration>
  635. <executable>${basedir}/../../dev-support/bin/shelldocs</executable>
  636. <workingDirectory>src/site/markdown</workingDirectory>
  637. <arguments>
  638. <argument>--skipprnorep</argument>
  639. <argument>--output</argument>
  640. <argument>${basedir}/src/site/markdown/UnixShellAPI.md</argument>
  641. <argument>--input</argument>
  642. <argument>${basedir}/src/main/bin/hadoop-functions.sh</argument>
  643. </arguments>
  644. </configuration>
  645. </execution>
  646. </executions>
  647. </plugin>
  648. <plugin>
  649. <artifactId>maven-clean-plugin</artifactId>
  650. <configuration>
  651. <filesets>
  652. <fileset>
  653. <directory>src/site/markdown</directory>
  654. <includes>
  655. <include>UnixShellAPI.md</include>
  656. </includes>
  657. <followSymlinks>false</followSymlinks>
  658. </fileset>
  659. <fileset>
  660. <directory>src/site/resources</directory>
  661. <includes>
  662. <include>configuration.xsl</include>
  663. <include>core-default.xml</include>
  664. </includes>
  665. <followSymlinks>false</followSymlinks>
  666. </fileset>
  667. </filesets>
  668. </configuration>
  669. </plugin>
  670. </plugins>
  671. </build>
  672. <profiles>
  673. <profile>
  674. <id>native</id>
  675. <activation>
  676. <activeByDefault>false</activeByDefault>
  677. </activation>
  678. <properties>
  679. <require.bzip2>false</require.bzip2>
  680. <zstd.prefix></zstd.prefix>
  681. <zstd.lib></zstd.lib>
  682. <zstd.include></zstd.include>
  683. <require.zstd>false</require.zstd>
  684. <openssl.prefix></openssl.prefix>
  685. <openssl.lib></openssl.lib>
  686. <openssl.include></openssl.include>
  687. <require.isal>false</require.isal>
  688. <isal.prefix></isal.prefix>
  689. <isal.lib></isal.lib>
  690. <require.openssl>false</require.openssl>
  691. <runningWithNative>true</runningWithNative>
  692. <bundle.openssl.in.bin>false</bundle.openssl.in.bin>
  693. <extra.libhadoop.rpath></extra.libhadoop.rpath>
  694. </properties>
  695. <build>
  696. <plugins>
  697. <plugin>
  698. <groupId>org.apache.maven.plugins</groupId>
  699. <artifactId>maven-enforcer-plugin</artifactId>
  700. <executions>
  701. <execution>
  702. <id>enforce-os</id>
  703. <goals>
  704. <goal>enforce</goal>
  705. </goals>
  706. <configuration>
  707. <rules>
  708. <requireOS>
  709. <family>mac</family>
  710. <family>unix</family>
  711. <message>native build only supported on Mac or Unix</message>
  712. </requireOS>
  713. </rules>
  714. <fail>true</fail>
  715. </configuration>
  716. </execution>
  717. </executions>
  718. </plugin>
  719. <plugin>
  720. <groupId>org.apache.hadoop</groupId>
  721. <artifactId>hadoop-maven-plugins</artifactId>
  722. <executions>
  723. <execution>
  724. <id>cmake-compile</id>
  725. <phase>compile</phase>
  726. <goals><goal>cmake-compile</goal></goals>
  727. <configuration>
  728. <source>${basedir}/src</source>
  729. <vars>
  730. <GENERATED_JAVAH>${project.build.directory}/native/javah</GENERATED_JAVAH>
  731. <JVM_ARCH_DATA_MODEL>${sun.arch.data.model}</JVM_ARCH_DATA_MODEL>
  732. <REQUIRE_BZIP2>${require.bzip2}</REQUIRE_BZIP2>
  733. <REQUIRE_ZSTD>${require.zstd}</REQUIRE_ZSTD>
  734. <CUSTOM_ZSTD_PREFIX>${zstd.prefix}</CUSTOM_ZSTD_PREFIX>
  735. <CUSTOM_ZSTD_LIB>${zstd.lib} </CUSTOM_ZSTD_LIB>
  736. <CUSTOM_ZSTD_INCLUDE>${zstd.include} </CUSTOM_ZSTD_INCLUDE>
  737. <REQUIRE_ISAL>${require.isal} </REQUIRE_ISAL>
  738. <CUSTOM_ISAL_PREFIX>${isal.prefix} </CUSTOM_ISAL_PREFIX>
  739. <CUSTOM_ISAL_LIB>${isal.lib} </CUSTOM_ISAL_LIB>
  740. <REQUIRE_PMDK>${require.pmdk}</REQUIRE_PMDK>
  741. <CUSTOM_PMDK_LIB>${pmdk.lib}</CUSTOM_PMDK_LIB>
  742. <REQUIRE_OPENSSL>${require.openssl} </REQUIRE_OPENSSL>
  743. <CUSTOM_OPENSSL_PREFIX>${openssl.prefix} </CUSTOM_OPENSSL_PREFIX>
  744. <CUSTOM_OPENSSL_LIB>${openssl.lib} </CUSTOM_OPENSSL_LIB>
  745. <CUSTOM_OPENSSL_INCLUDE>${openssl.include} </CUSTOM_OPENSSL_INCLUDE>
  746. <EXTRA_LIBHADOOP_RPATH>${extra.libhadoop.rpath}</EXTRA_LIBHADOOP_RPATH>
  747. </vars>
  748. </configuration>
  749. </execution>
  750. <execution>
  751. <id>test_bulk_crc32</id>
  752. <goals><goal>cmake-test</goal></goals>
  753. <phase>test</phase>
  754. <configuration>
  755. <binary>${project.build.directory}/native/test_bulk_crc32</binary>
  756. <timeout>1200</timeout>
  757. <results>${project.build.directory}/native-results</results>
  758. </configuration>
  759. </execution>
  760. <execution>
  761. <id>erasure_code_test</id>
  762. <goals><goal>cmake-test</goal></goals>
  763. <phase>test</phase>
  764. <configuration>
  765. <binary>${project.build.directory}/native/erasure_code_test</binary>
  766. <timeout>300</timeout>
  767. <results>${project.build.directory}/native-results</results>
  768. <skipIfMissing>true</skipIfMissing>
  769. <env>
  770. <LD_LIBRARY_PATH>${LD_LIBRARY_PATH}:${isal.lib}:${isal.prefix}:/usr/lib</LD_LIBRARY_PATH>
  771. </env>
  772. </configuration>
  773. </execution>
  774. </executions>
  775. </plugin>
  776. </plugins>
  777. </build>
  778. </profile>
  779. <profile>
  780. <id>native-win</id>
  781. <activation>
  782. <os>
  783. <family>Windows</family>
  784. </os>
  785. </activation>
  786. <properties>
  787. <require.isal>false</require.isal>
  788. <isal.prefix></isal.prefix>
  789. <isal.lib></isal.lib>
  790. <zstd.prefix></zstd.prefix>
  791. <zstd.lib></zstd.lib>
  792. <zstd.include></zstd.include>
  793. <require.zstd>false</require.zstd>
  794. <bundle.zstd.in.bin>true</bundle.zstd.in.bin>
  795. <openssl.prefix></openssl.prefix>
  796. <openssl.lib></openssl.lib>
  797. <openssl.include></openssl.include>
  798. <require.openssl>false</require.openssl>
  799. <runningWithNative>true</runningWithNative>
  800. <bundle.openssl.in.bin>false</bundle.openssl.in.bin>
  801. </properties>
  802. <build>
  803. <plugins>
  804. <plugin>
  805. <groupId>org.apache.maven.plugins</groupId>
  806. <artifactId>maven-enforcer-plugin</artifactId>
  807. <executions>
  808. <execution>
  809. <id>enforce-os</id>
  810. <goals>
  811. <goal>enforce</goal>
  812. </goals>
  813. <configuration>
  814. <rules>
  815. <requireOS>
  816. <family>windows</family>
  817. <message>native-win build only supported on Windows</message>
  818. </requireOS>
  819. </rules>
  820. <fail>true</fail>
  821. </configuration>
  822. </execution>
  823. </executions>
  824. </plugin>
  825. <plugin>
  826. <groupId>org.codehaus.mojo</groupId>
  827. <artifactId>exec-maven-plugin</artifactId>
  828. <executions>
  829. <execution>
  830. <id>convert-ms-winutils</id>
  831. <phase>generate-sources</phase>
  832. <goals>
  833. <goal>exec</goal>
  834. </goals>
  835. <configuration>
  836. <executable>${basedir}\..\..\dev-support\bin\win-vs-upgrade.cmd</executable>
  837. <arguments>
  838. <argument>${basedir}\src\main\winutils</argument>
  839. <argument>${project.build.directory}</argument>
  840. </arguments>
  841. </configuration>
  842. </execution>
  843. <execution>
  844. <id>compile-ms-winutils</id>
  845. <phase>compile</phase>
  846. <goals>
  847. <goal>exec</goal>
  848. </goals>
  849. <configuration>
  850. <executable>msbuild</executable>
  851. <arguments>
  852. <argument>${basedir}/src/main/winutils/winutils.sln</argument>
  853. <argument>/nologo</argument>
  854. <argument>/p:Configuration=Release</argument>
  855. <argument>/p:OutDir=${project.build.directory}/bin/</argument>
  856. <argument>/p:IntermediateOutputPath=${project.build.directory}/winutils/</argument>
  857. <argument>/p:WsceConfigDir=${wsce.config.dir}</argument>
  858. <argument>/p:WsceConfigFile=${wsce.config.file}</argument>
  859. </arguments>
  860. </configuration>
  861. </execution>
  862. <execution>
  863. <id>convert-ms-native-dll</id>
  864. <phase>generate-sources</phase>
  865. <goals>
  866. <goal>exec</goal>
  867. </goals>
  868. <configuration>
  869. <executable>${basedir}\..\..\dev-support\bin\win-vs-upgrade.cmd</executable>
  870. <arguments>
  871. <argument>${basedir}\src\main\native</argument>
  872. <argument>${project.build.directory}</argument>
  873. </arguments>
  874. </configuration>
  875. </execution>
  876. <execution>
  877. <id>compile-ms-native-dll</id>
  878. <phase>compile</phase>
  879. <goals>
  880. <goal>exec</goal>
  881. </goals>
  882. <configuration>
  883. <executable>msbuild</executable>
  884. <arguments>
  885. <argument>${basedir}/src/main/native/native.sln</argument>
  886. <argument>/nologo</argument>
  887. <argument>/p:Configuration=Release</argument>
  888. <argument>/p:OutDir=${project.build.directory}/bin/</argument>
  889. <argument>/p:CustomZstdPrefix=${zstd.prefix}</argument>
  890. <argument>/p:CustomZstdLib=${zstd.lib}</argument>
  891. <argument>/p:CustomZstdInclude=${zstd.include}</argument>
  892. <argument>/p:RequireZstd=${require.zstd}</argument>
  893. <argument>/p:CustomOpensslPrefix=${openssl.prefix}</argument>
  894. <argument>/p:CustomOpensslLib=${openssl.lib}</argument>
  895. <argument>/p:CustomOpensslInclude=${openssl.include}</argument>
  896. <argument>/p:RequireOpenssl=${require.openssl}</argument>
  897. <argument>/p:RequireIsal=${require.isal}</argument>
  898. <argument>/p:CustomIsalPrefix=${isal.prefix}</argument>
  899. <argument>/p:CustomIsalLib=${isal.lib}</argument>
  900. </arguments>
  901. </configuration>
  902. </execution>
  903. </executions>
  904. </plugin>
  905. </plugins>
  906. </build>
  907. </profile>
  908. <profile>
  909. <id>parallel-tests</id>
  910. <build>
  911. <plugins>
  912. <plugin>
  913. <groupId>org.apache.hadoop</groupId>
  914. <artifactId>hadoop-maven-plugins</artifactId>
  915. <executions>
  916. <execution>
  917. <id>parallel-tests-createdir</id>
  918. <phase>process-test-resources</phase>
  919. <goals>
  920. <goal>parallel-tests-createdir</goal>
  921. </goals>
  922. <configuration>
  923. <testBuildData>${test.build.data}</testBuildData>
  924. </configuration>
  925. </execution>
  926. </executions>
  927. </plugin>
  928. <plugin>
  929. <groupId>org.apache.maven.plugins</groupId>
  930. <artifactId>maven-surefire-plugin</artifactId>
  931. <configuration>
  932. <forkCount>${testsThreadCount}</forkCount>
  933. <reuseForks>false</reuseForks>
  934. <argLine>${maven-surefire-plugin.argLine} -DminiClusterDedicatedDirs=true</argLine>
  935. <systemPropertyVariables>
  936. <testsThreadCount>${testsThreadCount}</testsThreadCount>
  937. <test.build.data>${test.build.data}/${surefire.forkNumber}</test.build.data>
  938. <test.build.dir>${test.build.dir}/${surefire.forkNumber}</test.build.dir>
  939. <hadoop.tmp.dir>${hadoop.tmp.dir}/${surefire.forkNumber}</hadoop.tmp.dir>
  940. <!-- Due to a Maven quirk, setting this to just -->
  941. <!-- surefire.forkNumber won't do the parameter substitution. -->
  942. <!-- Putting a prefix in front of it like "fork-" makes it -->
  943. <!-- work. -->
  944. <test.unique.fork.id>fork-${surefire.forkNumber}</test.unique.fork.id>
  945. </systemPropertyVariables>
  946. </configuration>
  947. </plugin>
  948. </plugins>
  949. </build>
  950. </profile>
  951. <profile>
  952. <id>releasedocs</id>
  953. <activation>
  954. <activeByDefault>false</activeByDefault>
  955. </activation>
  956. <build>
  957. <plugins>
  958. <plugin>
  959. <groupId>org.codehaus.mojo</groupId>
  960. <artifactId>exec-maven-plugin</artifactId>
  961. <executions>
  962. <execution>
  963. <id>releasedocs</id>
  964. <phase>pre-site</phase>
  965. <goals>
  966. <goal>exec</goal>
  967. </goals>
  968. <configuration>
  969. <executable>${basedir}/../../dev-support/bin/releasedocmaker</executable>
  970. <requiresOnline>true</requiresOnline>
  971. <arguments>
  972. <argument>--index</argument>
  973. <argument>--license</argument>
  974. <argument>--outputdir</argument>
  975. <argument>${basedir}/src/site/markdown/release</argument>
  976. <argument>--project</argument>
  977. <argument>HADOOP</argument>
  978. <argument>--project</argument>
  979. <argument>HDFS</argument>
  980. <argument>--project</argument>
  981. <argument>MAPREDUCE</argument>
  982. <argument>--project</argument>
  983. <argument>YARN</argument>
  984. <argument>--projecttitle</argument>
  985. <argument>Apache Hadoop</argument>
  986. <argument>--usetoday</argument>
  987. <argument>--fileversions</argument>
  988. <argument>--dirversions</argument>
  989. <argument>--version</argument>
  990. <argument>${project.version}</argument>
  991. </arguments>
  992. </configuration>
  993. </execution>
  994. </executions>
  995. </plugin>
  996. <plugin>
  997. <artifactId>maven-clean-plugin</artifactId>
  998. <configuration>
  999. <filesets>
  1000. <fileset>
  1001. <directory>src/site/markdown/release</directory>
  1002. <includes>
  1003. <include>${project.version}/</include>
  1004. <include>index.md</include>
  1005. </includes>
  1006. <followSymlinks>false</followSymlinks>
  1007. </fileset>
  1008. </filesets>
  1009. </configuration>
  1010. </plugin>
  1011. </plugins>
  1012. </build>
  1013. </profile>
  1014. <!-- profile to test shell code -->
  1015. <profile>
  1016. <id>shelltest</id>
  1017. <activation>
  1018. <property>
  1019. <name>!skipTests</name>
  1020. </property>
  1021. </activation>
  1022. <build>
  1023. <plugins>
  1024. <plugin>
  1025. <artifactId>maven-antrun-plugin</artifactId>
  1026. <executions>
  1027. <execution>
  1028. <id>common-test-bats-driver</id>
  1029. <phase>test</phase>
  1030. <goals>
  1031. <goal>run</goal>
  1032. </goals>
  1033. <configuration>
  1034. <target>
  1035. <exec dir="src/test/scripts"
  1036. executable="bash"
  1037. failonerror="true">
  1038. <arg value="./run-bats.sh" />
  1039. </exec>
  1040. </target>
  1041. </configuration>
  1042. </execution>
  1043. </executions>
  1044. </plugin>
  1045. </plugins>
  1046. </build>
  1047. </profile>
  1048. <!-- profile to use already generated protobuf code using 2.5.0 for aarch64-->
  1049. <profile>
  1050. <id>aarch64</id>
  1051. <activation>
  1052. <activeByDefault>false</activeByDefault>
  1053. <os>
  1054. <arch>aarch64</arch>
  1055. </os>
  1056. </activation>
  1057. <build>
  1058. <plugins>
  1059. <plugin>
  1060. <groupId>org.codehaus.mojo</groupId>
  1061. <artifactId>build-helper-maven-plugin</artifactId>
  1062. <executions>
  1063. <execution>
  1064. <id>add-source-legacy-protobuf</id>
  1065. <phase>generate-sources</phase>
  1066. <goals>
  1067. <goal>add-source</goal>
  1068. </goals>
  1069. <configuration>
  1070. <sources>
  1071. <source>${basedir}/src/main/arm-java</source>
  1072. </sources>
  1073. </configuration>
  1074. </execution>
  1075. <execution>
  1076. <id>add-test-source-legacy-protobuf</id>
  1077. <phase>generate-test-sources</phase>
  1078. <goals>
  1079. <goal>add-test-source</goal>
  1080. </goals>
  1081. <configuration>
  1082. <sources>
  1083. <source>${basedir}/src/test/arm-java</source>
  1084. </sources>
  1085. </configuration>
  1086. </execution>
  1087. </executions>
  1088. </plugin>
  1089. </plugins>
  1090. </build>
  1091. </profile>
  1092. <!-- profile to generate protobuf code using 2.5.0-->
  1093. <profile>
  1094. <id>x86_64</id>
  1095. <activation>
  1096. <activeByDefault>false</activeByDefault>
  1097. <os>
  1098. <arch>!aarch64</arch>
  1099. </os>
  1100. </activation>
  1101. <build>
  1102. <plugins>
  1103. <plugin>
  1104. <groupId>org.xolstice.maven.plugins</groupId>
  1105. <artifactId>protobuf-maven-plugin</artifactId>
  1106. <executions>
  1107. <execution>
  1108. <id>src-compile-protoc-legacy</id>
  1109. <phase>generate-sources</phase>
  1110. <goals>
  1111. <goal>compile</goal>
  1112. </goals>
  1113. <configuration>
  1114. <skip>false</skip>
  1115. <!--Generating with old protobuf version for backward compatibility-->
  1116. <protocArtifact>
  1117. com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier}
  1118. </protocArtifact>
  1119. <includeDependenciesInDescriptorSet>false</includeDependenciesInDescriptorSet>
  1120. <protoSourceRoot>${basedir}/src/main/proto</protoSourceRoot>
  1121. <outputDirectory>${project.build.directory}/generated-sources/java</outputDirectory>
  1122. <clearOutputDirectory>false</clearOutputDirectory>
  1123. <includes>
  1124. <include>ProtobufRpcEngine.proto</include>
  1125. </includes>
  1126. </configuration>
  1127. </execution>
  1128. <execution>
  1129. <id>src-test-compile-protoc-legacy</id>
  1130. <phase>generate-test-sources</phase>
  1131. <goals>
  1132. <goal>test-compile</goal>
  1133. </goals>
  1134. <configuration>
  1135. <skip>false</skip>
  1136. <!--Generating with old protobuf version for backward compatibility-->
  1137. <protocArtifact>
  1138. com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier}
  1139. </protocArtifact>
  1140. <includeDependenciesInDescriptorSet>false</includeDependenciesInDescriptorSet>
  1141. <protoTestSourceRoot>${basedir}/src/test/proto</protoTestSourceRoot>
  1142. <outputDirectory>${project.build.directory}/generated-test-sources/java</outputDirectory>
  1143. <clearOutputDirectory>false</clearOutputDirectory>
  1144. <includes>
  1145. <include>test_legacy.proto</include>
  1146. <include>test_rpc_service_legacy.proto</include>
  1147. </includes>
  1148. </configuration>
  1149. </execution>
  1150. </executions>
  1151. </plugin>
  1152. <plugin>
  1153. <groupId>org.apache.maven.plugins</groupId>
  1154. <artifactId>maven-javadoc-plugin</artifactId>
  1155. <configuration>
  1156. <sourceFileExcludes>
  1157. <sourceFileExclude>**/FSProtos.java</sourceFileExclude>
  1158. </sourceFileExcludes>
  1159. <excludePackageNames>*.proto:*.tracing:*.protobuf</excludePackageNames>
  1160. </configuration>
  1161. </plugin>
  1162. </plugins>
  1163. </build>
  1164. </profile>
  1165. </profiles>
  1166. </project>