pom.xml 43 KB

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