pom.xml 42 KB

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