pom.xml 36 KB

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