pom.xml 36 KB

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