pom.xml 40 KB

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