pom.xml 42 KB

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