pom.xml 37 KB

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