pom.xml 40 KB

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