pom.xml 41 KB

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