pom.xml 39 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096
  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.4.0-SNAPSHOT</version>
  22. <relativePath>../../hadoop-project-dist</relativePath>
  23. </parent>
  24. <artifactId>hadoop-common</artifactId>
  25. <version>3.4.0-SNAPSHOT</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. </dependency>
  321. <dependency>
  322. <groupId>org.apache.kerby</groupId>
  323. <artifactId>kerb-core</artifactId>
  324. </dependency>
  325. <dependency>
  326. <groupId>com.fasterxml.jackson.core</groupId>
  327. <artifactId>jackson-databind</artifactId>
  328. </dependency>
  329. <dependency>
  330. <groupId>org.codehaus.woodstox</groupId>
  331. <artifactId>stax2-api</artifactId>
  332. <scope>compile</scope>
  333. </dependency>
  334. <dependency>
  335. <groupId>com.fasterxml.woodstox</groupId>
  336. <artifactId>woodstox-core</artifactId>
  337. <scope>compile</scope>
  338. </dependency>
  339. <dependency>
  340. <groupId>com.squareup.okhttp3</groupId>
  341. <artifactId>mockwebserver</artifactId>
  342. <scope>test</scope>
  343. </dependency>
  344. <dependency>
  345. <groupId>dnsjava</groupId>
  346. <artifactId>dnsjava</artifactId>
  347. <scope>compile</scope>
  348. </dependency>
  349. <dependency>
  350. <groupId>org.wildfly.openssl</groupId>
  351. <artifactId>wildfly-openssl</artifactId>
  352. <scope>test</scope>
  353. </dependency>
  354. <dependency>
  355. <groupId>org.wildfly.openssl</groupId>
  356. <artifactId>wildfly-openssl-java</artifactId>
  357. <scope>provided</scope>
  358. </dependency>
  359. <dependency>
  360. <groupId>org.xerial.snappy</groupId>
  361. <artifactId>snappy-java</artifactId>
  362. <scope>compile</scope>
  363. </dependency>
  364. <dependency>
  365. <groupId>org.lz4</groupId>
  366. <artifactId>lz4-java</artifactId>
  367. <scope>provided</scope>
  368. </dependency>
  369. </dependencies>
  370. <build>
  371. <!--
  372. Include all files in src/main/resources. By default, do not apply property
  373. substitution (filtering=false), but do apply property substitution to
  374. common-version-info.properties (filtering=true). This will substitute the
  375. version information correctly, but prevent Maven from altering other files
  376. like core-default.xml.
  377. -->
  378. <resources>
  379. <resource>
  380. <directory>${basedir}/src/main/resources</directory>
  381. <excludes>
  382. <exclude>common-version-info.properties</exclude>
  383. </excludes>
  384. <filtering>false</filtering>
  385. </resource>
  386. <resource>
  387. <directory>${basedir}/src/main/resources</directory>
  388. <includes>
  389. <include>common-version-info.properties</include>
  390. </includes>
  391. <filtering>true</filtering>
  392. </resource>
  393. </resources>
  394. <plugins>
  395. <plugin>
  396. <groupId>org.xolstice.maven.plugins</groupId>
  397. <artifactId>protobuf-maven-plugin</artifactId>
  398. <executions>
  399. <execution>
  400. <id>src-compile-protoc</id>
  401. <configuration>
  402. <skip>false</skip>
  403. <excludes>
  404. <exclude>ProtobufRpcEngine.proto</exclude>
  405. </excludes>
  406. </configuration>
  407. </execution>
  408. <execution>
  409. <id>src-test-compile-protoc</id>
  410. <configuration><skip>false</skip></configuration>
  411. </execution>
  412. </executions>
  413. </plugin>
  414. <plugin>
  415. <groupId>com.google.code.maven-replacer-plugin</groupId>
  416. <artifactId>replacer</artifactId>
  417. <executions>
  418. <execution>
  419. <id>replace-generated-sources</id>
  420. <configuration>
  421. <skip>false</skip>
  422. <excludes>
  423. <exclude>**/ProtobufRpcEngineProtos.java</exclude>
  424. </excludes>
  425. </configuration>
  426. </execution>
  427. <execution>
  428. <id>replace-generated-test-sources</id>
  429. <configuration>
  430. <skip>false</skip>
  431. </configuration>
  432. </execution>
  433. <execution>
  434. <id>replace-sources</id>
  435. <configuration>
  436. <skip>false</skip>
  437. <!--These classes have direct Protobuf references for backward compatibility reasons-->
  438. <excludes>
  439. <exclude>**/ProtobufHelper.java</exclude>
  440. <exclude>**/RpcWritable.java</exclude>
  441. <exclude>**/ProtobufRpcEngineCallback.java</exclude>
  442. <exclude>**/ProtobufRpcEngine.java</exclude>
  443. <exclude>**/ProtobufRpcEngineProtos.java</exclude>
  444. </excludes>
  445. </configuration>
  446. </execution>
  447. <execution>
  448. <id>replace-test-sources</id>
  449. <configuration>
  450. <skip>false</skip>
  451. </configuration>
  452. </execution>
  453. </executions>
  454. </plugin>
  455. <plugin>
  456. <groupId>org.apache.hadoop</groupId>
  457. <artifactId>hadoop-maven-plugins</artifactId>
  458. <executions>
  459. <execution>
  460. <id>version-info</id>
  461. <phase>generate-resources</phase>
  462. <goals>
  463. <goal>version-info</goal>
  464. </goals>
  465. <configuration>
  466. <source>
  467. <directory>${basedir}/src/main</directory>
  468. <includes>
  469. <include>java/**/*.java</include>
  470. <include>proto/**/*.proto</include>
  471. </includes>
  472. </source>
  473. </configuration>
  474. </execution>
  475. <execution>
  476. <id>resource-gz</id>
  477. <phase>generate-resources</phase>
  478. <goals>
  479. <goal>resource-gz</goal>
  480. </goals>
  481. <configuration>
  482. <inputDirectory>${basedir}/src/main/webapps/static</inputDirectory>
  483. <outputDirectory>${basedir}/target/webapps/static</outputDirectory>
  484. <extensions>js,css</extensions>
  485. </configuration>
  486. </execution>
  487. </executions>
  488. </plugin>
  489. <plugin>
  490. <groupId>org.apache.maven.plugins</groupId>
  491. <artifactId>maven-surefire-plugin</artifactId>
  492. <configuration>
  493. <systemPropertyVariables>
  494. <runningWithNative>${runningWithNative}</runningWithNative>
  495. </systemPropertyVariables>
  496. <properties>
  497. <property>
  498. <name>listener</name>
  499. <value>org.apache.hadoop.test.TimedOutTestsListener</value>
  500. </property>
  501. </properties>
  502. </configuration>
  503. </plugin>
  504. <plugin>
  505. <groupId>org.apache.avro</groupId>
  506. <artifactId>avro-maven-plugin</artifactId>
  507. <executions>
  508. <execution>
  509. <id>generate-avro-test-sources</id>
  510. <phase>generate-test-sources</phase>
  511. <goals>
  512. <goal>schema</goal>
  513. </goals>
  514. </execution>
  515. </executions>
  516. <configuration>
  517. <testOutputDirectory>${project.build.directory}/generated-test-sources/java</testOutputDirectory>
  518. </configuration>
  519. </plugin>
  520. <plugin>
  521. <groupId>org.apache.maven.plugins</groupId>
  522. <artifactId>maven-antrun-plugin</artifactId>
  523. <executions>
  524. <execution>
  525. <id>create-log-dir</id>
  526. <phase>process-test-resources</phase>
  527. <goals>
  528. <goal>run</goal>
  529. </goals>
  530. <configuration>
  531. <target>
  532. <!--
  533. TODO: there are tests (TestLocalFileSystem#testCopy) that fail if data
  534. TODO: from a previous run is present
  535. -->
  536. <delete dir="${test.build.data}"/>
  537. <mkdir dir="${test.build.data}"/>
  538. <mkdir dir="${hadoop.log.dir}"/>
  539. <copy toDir="${project.build.directory}/test-classes">
  540. <fileset dir="${basedir}/src/main/conf"/>
  541. </copy>
  542. </target>
  543. </configuration>
  544. </execution>
  545. <execution>
  546. <phase>pre-site</phase>
  547. <goals>
  548. <goal>run</goal>
  549. </goals>
  550. <configuration>
  551. <target>
  552. <copy file="src/main/resources/core-default.xml" todir="src/site/resources"/>
  553. <copy file="src/main/xsl/configuration.xsl" todir="src/site/resources"/>
  554. </target>
  555. </configuration>
  556. </execution>
  557. </executions>
  558. </plugin>
  559. <plugin>
  560. <groupId>org.apache.rat</groupId>
  561. <artifactId>apache-rat-plugin</artifactId>
  562. <configuration>
  563. <excludes>
  564. <exclude>.idea/**</exclude>
  565. <exclude>src/main/conf/*</exclude>
  566. <exclude>dev-support/jdiff/**</exclude>
  567. <exclude>src/main/native/*</exclude>
  568. <exclude>src/main/native/config/*</exclude>
  569. <exclude>src/main/native/m4/*</exclude>
  570. <exclude>src/test/empty-file</exclude>
  571. <exclude>src/test/all-tests</exclude>
  572. <exclude>src/main/native/gtest/**/*</exclude>
  573. <exclude>src/test/resources/test-untar.tgz</exclude>
  574. <exclude>src/test/resources/test.har/_SUCCESS</exclude>
  575. <exclude>src/test/resources/test.har/_index</exclude>
  576. <exclude>src/test/resources/test.har/_masterindex</exclude>
  577. <exclude>src/test/resources/test.har/part-0</exclude>
  578. <exclude>src/test/resources/javakeystoreprovider.password</exclude>
  579. <exclude>dev-support/jdiff-workaround.patch</exclude>
  580. </excludes>
  581. </configuration>
  582. </plugin>
  583. <plugin>
  584. <groupId>org.codehaus.mojo</groupId>
  585. <artifactId>exec-maven-plugin</artifactId>
  586. <executions>
  587. <execution>
  588. <id>shelldocs</id>
  589. <phase>pre-site</phase>
  590. <goals>
  591. <goal>exec</goal>
  592. </goals>
  593. <configuration>
  594. <executable>${basedir}/../../dev-support/bin/shelldocs</executable>
  595. <workingDirectory>src/site/markdown</workingDirectory>
  596. <arguments>
  597. <argument>--skipprnorep</argument>
  598. <argument>--output</argument>
  599. <argument>${basedir}/src/site/markdown/UnixShellAPI.md</argument>
  600. <argument>--input</argument>
  601. <argument>${basedir}/src/main/bin/hadoop-functions.sh</argument>
  602. </arguments>
  603. </configuration>
  604. </execution>
  605. </executions>
  606. </plugin>
  607. <plugin>
  608. <artifactId>maven-clean-plugin</artifactId>
  609. <configuration>
  610. <filesets>
  611. <fileset>
  612. <directory>src/site/markdown</directory>
  613. <includes>
  614. <include>UnixShellAPI.md</include>
  615. </includes>
  616. <followSymlinks>false</followSymlinks>
  617. </fileset>
  618. <fileset>
  619. <directory>src/site/resources</directory>
  620. <includes>
  621. <include>configuration.xsl</include>
  622. <include>core-default.xml</include>
  623. </includes>
  624. <followSymlinks>false</followSymlinks>
  625. </fileset>
  626. </filesets>
  627. </configuration>
  628. </plugin>
  629. </plugins>
  630. </build>
  631. <profiles>
  632. <profile>
  633. <id>native</id>
  634. <activation>
  635. <activeByDefault>false</activeByDefault>
  636. </activation>
  637. <properties>
  638. <require.bzip2>false</require.bzip2>
  639. <zstd.prefix></zstd.prefix>
  640. <zstd.lib></zstd.lib>
  641. <zstd.include></zstd.include>
  642. <require.zstd>false</require.zstd>
  643. <openssl.prefix></openssl.prefix>
  644. <openssl.lib></openssl.lib>
  645. <openssl.include></openssl.include>
  646. <require.isal>false</require.isal>
  647. <isal.prefix></isal.prefix>
  648. <isal.lib></isal.lib>
  649. <require.openssl>false</require.openssl>
  650. <runningWithNative>true</runningWithNative>
  651. <bundle.openssl.in.bin>false</bundle.openssl.in.bin>
  652. <extra.libhadoop.rpath></extra.libhadoop.rpath>
  653. </properties>
  654. <build>
  655. <plugins>
  656. <plugin>
  657. <groupId>org.apache.maven.plugins</groupId>
  658. <artifactId>maven-enforcer-plugin</artifactId>
  659. <executions>
  660. <execution>
  661. <id>enforce-os</id>
  662. <goals>
  663. <goal>enforce</goal>
  664. </goals>
  665. <configuration>
  666. <rules>
  667. <requireOS>
  668. <family>mac</family>
  669. <family>unix</family>
  670. <message>native build only supported on Mac or Unix</message>
  671. </requireOS>
  672. </rules>
  673. <fail>true</fail>
  674. </configuration>
  675. </execution>
  676. </executions>
  677. </plugin>
  678. <plugin>
  679. <groupId>org.apache.hadoop</groupId>
  680. <artifactId>hadoop-maven-plugins</artifactId>
  681. <executions>
  682. <execution>
  683. <id>cmake-compile</id>
  684. <phase>compile</phase>
  685. <goals><goal>cmake-compile</goal></goals>
  686. <configuration>
  687. <source>${basedir}/src</source>
  688. <vars>
  689. <GENERATED_JAVAH>${project.build.directory}/native/javah</GENERATED_JAVAH>
  690. <JVM_ARCH_DATA_MODEL>${sun.arch.data.model}</JVM_ARCH_DATA_MODEL>
  691. <REQUIRE_BZIP2>${require.bzip2}</REQUIRE_BZIP2>
  692. <REQUIRE_ZSTD>${require.zstd}</REQUIRE_ZSTD>
  693. <CUSTOM_ZSTD_PREFIX>${zstd.prefix}</CUSTOM_ZSTD_PREFIX>
  694. <CUSTOM_ZSTD_LIB>${zstd.lib} </CUSTOM_ZSTD_LIB>
  695. <CUSTOM_ZSTD_INCLUDE>${zstd.include} </CUSTOM_ZSTD_INCLUDE>
  696. <REQUIRE_ISAL>${require.isal} </REQUIRE_ISAL>
  697. <CUSTOM_ISAL_PREFIX>${isal.prefix} </CUSTOM_ISAL_PREFIX>
  698. <CUSTOM_ISAL_LIB>${isal.lib} </CUSTOM_ISAL_LIB>
  699. <REQUIRE_PMDK>${require.pmdk}</REQUIRE_PMDK>
  700. <CUSTOM_PMDK_LIB>${pmdk.lib}</CUSTOM_PMDK_LIB>
  701. <REQUIRE_OPENSSL>${require.openssl} </REQUIRE_OPENSSL>
  702. <CUSTOM_OPENSSL_PREFIX>${openssl.prefix} </CUSTOM_OPENSSL_PREFIX>
  703. <CUSTOM_OPENSSL_LIB>${openssl.lib} </CUSTOM_OPENSSL_LIB>
  704. <CUSTOM_OPENSSL_INCLUDE>${openssl.include} </CUSTOM_OPENSSL_INCLUDE>
  705. <EXTRA_LIBHADOOP_RPATH>${extra.libhadoop.rpath}</EXTRA_LIBHADOOP_RPATH>
  706. </vars>
  707. </configuration>
  708. </execution>
  709. <execution>
  710. <id>test_bulk_crc32</id>
  711. <goals><goal>cmake-test</goal></goals>
  712. <phase>test</phase>
  713. <configuration>
  714. <binary>${project.build.directory}/native/test_bulk_crc32</binary>
  715. <timeout>1200</timeout>
  716. <results>${project.build.directory}/native-results</results>
  717. </configuration>
  718. </execution>
  719. <execution>
  720. <id>erasure_code_test</id>
  721. <goals><goal>cmake-test</goal></goals>
  722. <phase>test</phase>
  723. <configuration>
  724. <binary>${project.build.directory}/native/erasure_code_test</binary>
  725. <timeout>300</timeout>
  726. <results>${project.build.directory}/native-results</results>
  727. <skipIfMissing>true</skipIfMissing>
  728. <env>
  729. <LD_LIBRARY_PATH>${LD_LIBRARY_PATH}:${isal.lib}:${isal.prefix}:/usr/lib</LD_LIBRARY_PATH>
  730. </env>
  731. </configuration>
  732. </execution>
  733. </executions>
  734. </plugin>
  735. </plugins>
  736. </build>
  737. </profile>
  738. <profile>
  739. <id>native-win</id>
  740. <activation>
  741. <os>
  742. <family>Windows</family>
  743. </os>
  744. </activation>
  745. <properties>
  746. <require.isal>false</require.isal>
  747. <isal.prefix></isal.prefix>
  748. <isal.lib></isal.lib>
  749. <zstd.prefix></zstd.prefix>
  750. <zstd.lib></zstd.lib>
  751. <zstd.include></zstd.include>
  752. <require.zstd>false</require.zstd>
  753. <bundle.zstd.in.bin>true</bundle.zstd.in.bin>
  754. <openssl.prefix></openssl.prefix>
  755. <openssl.lib></openssl.lib>
  756. <openssl.include></openssl.include>
  757. <require.openssl>false</require.openssl>
  758. <runningWithNative>true</runningWithNative>
  759. <bundle.openssl.in.bin>false</bundle.openssl.in.bin>
  760. </properties>
  761. <build>
  762. <plugins>
  763. <plugin>
  764. <groupId>org.apache.maven.plugins</groupId>
  765. <artifactId>maven-enforcer-plugin</artifactId>
  766. <executions>
  767. <execution>
  768. <id>enforce-os</id>
  769. <goals>
  770. <goal>enforce</goal>
  771. </goals>
  772. <configuration>
  773. <rules>
  774. <requireOS>
  775. <family>windows</family>
  776. <message>native-win build only supported on Windows</message>
  777. </requireOS>
  778. </rules>
  779. <fail>true</fail>
  780. </configuration>
  781. </execution>
  782. </executions>
  783. </plugin>
  784. <plugin>
  785. <groupId>org.codehaus.mojo</groupId>
  786. <artifactId>exec-maven-plugin</artifactId>
  787. <executions>
  788. <execution>
  789. <id>convert-ms-winutils</id>
  790. <phase>generate-sources</phase>
  791. <goals>
  792. <goal>exec</goal>
  793. </goals>
  794. <configuration>
  795. <executable>${basedir}\..\..\dev-support\bin\win-vs-upgrade.cmd</executable>
  796. <arguments>
  797. <argument>${basedir}\src\main\winutils</argument>
  798. <argument>${project.build.directory}</argument>
  799. </arguments>
  800. </configuration>
  801. </execution>
  802. <execution>
  803. <id>compile-ms-winutils</id>
  804. <phase>compile</phase>
  805. <goals>
  806. <goal>exec</goal>
  807. </goals>
  808. <configuration>
  809. <executable>msbuild</executable>
  810. <arguments>
  811. <argument>${basedir}/src/main/winutils/winutils.sln</argument>
  812. <argument>/nologo</argument>
  813. <argument>/p:Configuration=Release</argument>
  814. <argument>/p:OutDir=${project.build.directory}/bin/</argument>
  815. <argument>/p:IntermediateOutputPath=${project.build.directory}/winutils/</argument>
  816. <argument>/p:WsceConfigDir=${wsce.config.dir}</argument>
  817. <argument>/p:WsceConfigFile=${wsce.config.file}</argument>
  818. </arguments>
  819. </configuration>
  820. </execution>
  821. <execution>
  822. <id>convert-ms-native-dll</id>
  823. <phase>generate-sources</phase>
  824. <goals>
  825. <goal>exec</goal>
  826. </goals>
  827. <configuration>
  828. <executable>${basedir}\..\..\dev-support\bin\win-vs-upgrade.cmd</executable>
  829. <arguments>
  830. <argument>${basedir}\src\main\native</argument>
  831. <argument>${project.build.directory}</argument>
  832. </arguments>
  833. </configuration>
  834. </execution>
  835. <execution>
  836. <id>compile-ms-native-dll</id>
  837. <phase>compile</phase>
  838. <goals>
  839. <goal>exec</goal>
  840. </goals>
  841. <configuration>
  842. <executable>msbuild</executable>
  843. <arguments>
  844. <argument>${basedir}/src/main/native/native.sln</argument>
  845. <argument>/nologo</argument>
  846. <argument>/p:Configuration=Release</argument>
  847. <argument>/p:OutDir=${project.build.directory}/bin/</argument>
  848. <argument>/p:CustomZstdPrefix=${zstd.prefix}</argument>
  849. <argument>/p:CustomZstdLib=${zstd.lib}</argument>
  850. <argument>/p:CustomZstdInclude=${zstd.include}</argument>
  851. <argument>/p:RequireZstd=${require.zstd}</argument>
  852. <argument>/p:CustomOpensslPrefix=${openssl.prefix}</argument>
  853. <argument>/p:CustomOpensslLib=${openssl.lib}</argument>
  854. <argument>/p:CustomOpensslInclude=${openssl.include}</argument>
  855. <argument>/p:RequireOpenssl=${require.openssl}</argument>
  856. <argument>/p:RequireIsal=${require.isal}</argument>
  857. <argument>/p:CustomIsalPrefix=${isal.prefix}</argument>
  858. <argument>/p:CustomIsalLib=${isal.lib}</argument>
  859. </arguments>
  860. </configuration>
  861. </execution>
  862. </executions>
  863. </plugin>
  864. </plugins>
  865. </build>
  866. </profile>
  867. <profile>
  868. <id>parallel-tests</id>
  869. <build>
  870. <plugins>
  871. <plugin>
  872. <groupId>org.apache.hadoop</groupId>
  873. <artifactId>hadoop-maven-plugins</artifactId>
  874. <executions>
  875. <execution>
  876. <id>parallel-tests-createdir</id>
  877. <phase>process-test-resources</phase>
  878. <goals>
  879. <goal>parallel-tests-createdir</goal>
  880. </goals>
  881. <configuration>
  882. <testBuildData>${test.build.data}</testBuildData>
  883. </configuration>
  884. </execution>
  885. </executions>
  886. </plugin>
  887. <plugin>
  888. <groupId>org.apache.maven.plugins</groupId>
  889. <artifactId>maven-surefire-plugin</artifactId>
  890. <configuration>
  891. <testFailureIgnore>${ignoreTestFailure}</testFailureIgnore>
  892. <forkCount>${testsThreadCount}</forkCount>
  893. <reuseForks>false</reuseForks>
  894. <argLine>${maven-surefire-plugin.argLine} -DminiClusterDedicatedDirs=true</argLine>
  895. <systemPropertyVariables>
  896. <testsThreadCount>${testsThreadCount}</testsThreadCount>
  897. <test.build.data>${test.build.data}/${surefire.forkNumber}</test.build.data>
  898. <test.build.dir>${test.build.dir}/${surefire.forkNumber}</test.build.dir>
  899. <hadoop.tmp.dir>${hadoop.tmp.dir}/${surefire.forkNumber}</hadoop.tmp.dir>
  900. <!-- Due to a Maven quirk, setting this to just -->
  901. <!-- surefire.forkNumber won't do the parameter substitution. -->
  902. <!-- Putting a prefix in front of it like "fork-" makes it -->
  903. <!-- work. -->
  904. <test.unique.fork.id>fork-${surefire.forkNumber}</test.unique.fork.id>
  905. </systemPropertyVariables>
  906. </configuration>
  907. </plugin>
  908. </plugins>
  909. </build>
  910. </profile>
  911. <profile>
  912. <id>releasedocs</id>
  913. <activation>
  914. <activeByDefault>false</activeByDefault>
  915. </activation>
  916. <build>
  917. <plugins>
  918. <plugin>
  919. <groupId>org.codehaus.mojo</groupId>
  920. <artifactId>exec-maven-plugin</artifactId>
  921. <executions>
  922. <execution>
  923. <id>releasedocs</id>
  924. <phase>pre-site</phase>
  925. <goals>
  926. <goal>exec</goal>
  927. </goals>
  928. <configuration>
  929. <executable>${basedir}/../../dev-support/bin/releasedocmaker</executable>
  930. <requiresOnline>true</requiresOnline>
  931. <arguments>
  932. <argument>--index</argument>
  933. <argument>--license</argument>
  934. <argument>--outputdir</argument>
  935. <argument>${basedir}/src/site/markdown/release</argument>
  936. <argument>--project</argument>
  937. <argument>HADOOP</argument>
  938. <argument>--project</argument>
  939. <argument>HDFS</argument>
  940. <argument>--project</argument>
  941. <argument>MAPREDUCE</argument>
  942. <argument>--project</argument>
  943. <argument>YARN</argument>
  944. <argument>--projecttitle</argument>
  945. <argument>Apache Hadoop</argument>
  946. <argument>--usetoday</argument>
  947. <argument>--fileversions</argument>
  948. <argument>--dirversions</argument>
  949. <argument>--version</argument>
  950. <argument>${project.version}</argument>
  951. </arguments>
  952. </configuration>
  953. </execution>
  954. </executions>
  955. </plugin>
  956. <plugin>
  957. <artifactId>maven-clean-plugin</artifactId>
  958. <configuration>
  959. <filesets>
  960. <fileset>
  961. <directory>src/site/markdown/release</directory>
  962. <includes>
  963. <include>${project.version}/</include>
  964. <include>index.md</include>
  965. </includes>
  966. <followSymlinks>false</followSymlinks>
  967. </fileset>
  968. </filesets>
  969. </configuration>
  970. </plugin>
  971. </plugins>
  972. </build>
  973. </profile>
  974. <!-- profile to test shell code -->
  975. <profile>
  976. <id>shelltest</id>
  977. <activation>
  978. <property>
  979. <name>!skipTests</name>
  980. </property>
  981. </activation>
  982. <build>
  983. <plugins>
  984. <plugin>
  985. <artifactId>maven-antrun-plugin</artifactId>
  986. <executions>
  987. <execution>
  988. <id>common-test-bats-driver</id>
  989. <phase>test</phase>
  990. <goals>
  991. <goal>run</goal>
  992. </goals>
  993. <configuration>
  994. <target>
  995. <exec dir="src/test/scripts"
  996. executable="bash"
  997. failonerror="true">
  998. <arg value="./run-bats.sh" />
  999. </exec>
  1000. </target>
  1001. </configuration>
  1002. </execution>
  1003. </executions>
  1004. </plugin>
  1005. </plugins>
  1006. </build>
  1007. </profile>
  1008. <!-- profile to use already generated protobuf code using 2.5.0 for aarch64-->
  1009. <profile>
  1010. <id>aarch64</id>
  1011. <activation>
  1012. <activeByDefault>false</activeByDefault>
  1013. <os>
  1014. <arch>aarch64</arch>
  1015. </os>
  1016. </activation>
  1017. <build>
  1018. <plugins>
  1019. <plugin>
  1020. <groupId>org.codehaus.mojo</groupId>
  1021. <artifactId>build-helper-maven-plugin</artifactId>
  1022. <executions>
  1023. <execution>
  1024. <id>add-source-legacy-protobuf</id>
  1025. <phase>generate-sources</phase>
  1026. <goals>
  1027. <goal>add-source</goal>
  1028. </goals>
  1029. <configuration>
  1030. <sources>
  1031. <source>${basedir}/src/main/arm-java</source>
  1032. </sources>
  1033. </configuration>
  1034. </execution>
  1035. </executions>
  1036. </plugin>
  1037. </plugins>
  1038. </build>
  1039. </profile>
  1040. <!-- profile to generate protobuf code using 2.5.0-->
  1041. <profile>
  1042. <id>x86_64</id>
  1043. <activation>
  1044. <activeByDefault>false</activeByDefault>
  1045. <os>
  1046. <arch>!aarch64</arch>
  1047. </os>
  1048. </activation>
  1049. <build>
  1050. <plugins>
  1051. <plugin>
  1052. <groupId>org.xolstice.maven.plugins</groupId>
  1053. <artifactId>protobuf-maven-plugin</artifactId>
  1054. <executions>
  1055. <execution>
  1056. <id>src-compile-protoc-legacy</id>
  1057. <phase>generate-sources</phase>
  1058. <goals>
  1059. <goal>compile</goal>
  1060. </goals>
  1061. <configuration>
  1062. <skip>false</skip>
  1063. <!--Generating with old protobuf version for backward compatibility-->
  1064. <protocArtifact>
  1065. com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier}
  1066. </protocArtifact>
  1067. <includeDependenciesInDescriptorSet>false</includeDependenciesInDescriptorSet>
  1068. <protoSourceRoot>${basedir}/src/main/proto</protoSourceRoot>
  1069. <outputDirectory>${project.build.directory}/generated-sources/java</outputDirectory>
  1070. <clearOutputDirectory>false</clearOutputDirectory>
  1071. <includes>
  1072. <include>ProtobufRpcEngine.proto</include>
  1073. </includes>
  1074. </configuration>
  1075. </execution>
  1076. </executions>
  1077. </plugin>
  1078. </plugins>
  1079. </build>
  1080. </profile>
  1081. </profiles>
  1082. </project>