pom.xml 42 KB

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