pom.xml 39 KB

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