pom.xml 43 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088
  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.io.erasurecode.rawcoder.NativeXORRawEncoder</javahClassName>
  634. <javahClassName>org.apache.hadoop.io.erasurecode.rawcoder.NativeXORRawDecoder</javahClassName>
  635. <javahClassName>org.apache.hadoop.crypto.OpensslCipher</javahClassName>
  636. <javahClassName>org.apache.hadoop.crypto.random.OpensslSecureRandom</javahClassName>
  637. <javahClassName>org.apache.hadoop.util.NativeCrc32</javahClassName>
  638. <javahClassName>org.apache.hadoop.net.unix.DomainSocket</javahClassName>
  639. <javahClassName>org.apache.hadoop.net.unix.DomainSocketWatcher</javahClassName>
  640. </javahClassNames>
  641. <javahOutputDirectory>${project.build.directory}/native/javah</javahOutputDirectory>
  642. </configuration>
  643. </execution>
  644. </executions>
  645. </plugin>
  646. <plugin>
  647. <groupId>org.apache.hadoop</groupId>
  648. <artifactId>hadoop-maven-plugins</artifactId>
  649. <executions>
  650. <execution>
  651. <id>cmake-compile</id>
  652. <phase>compile</phase>
  653. <goals><goal>cmake-compile</goal></goals>
  654. <configuration>
  655. <source>${basedir}/src</source>
  656. <vars>
  657. <GENERATED_JAVAH>${project.build.directory}/native/javah</GENERATED_JAVAH>
  658. <JVM_ARCH_DATA_MODEL>${sun.arch.data.model}</JVM_ARCH_DATA_MODEL>
  659. <REQUIRE_BZIP2>${require.bzip2}</REQUIRE_BZIP2>
  660. <REQUIRE_SNAPPY>${require.snappy}</REQUIRE_SNAPPY>
  661. <CUSTOM_SNAPPY_PREFIX>${snappy.prefix}</CUSTOM_SNAPPY_PREFIX>
  662. <CUSTOM_SNAPPY_LIB>${snappy.lib} </CUSTOM_SNAPPY_LIB>
  663. <CUSTOM_SNAPPY_INCLUDE>${snappy.include} </CUSTOM_SNAPPY_INCLUDE>
  664. <REQUIRE_ISAL>${require.isal} </REQUIRE_ISAL>
  665. <CUSTOM_ISAL_PREFIX>${isal.prefix} </CUSTOM_ISAL_PREFIX>
  666. <CUSTOM_ISAL_LIB>${isal.lib} </CUSTOM_ISAL_LIB>
  667. <REQUIRE_OPENSSL>${require.openssl} </REQUIRE_OPENSSL>
  668. <CUSTOM_OPENSSL_PREFIX>${openssl.prefix} </CUSTOM_OPENSSL_PREFIX>
  669. <CUSTOM_OPENSSL_LIB>${openssl.lib} </CUSTOM_OPENSSL_LIB>
  670. <CUSTOM_OPENSSL_INCLUDE>${openssl.include} </CUSTOM_OPENSSL_INCLUDE>
  671. <EXTRA_LIBHADOOP_RPATH>${extra.libhadoop.rpath}</EXTRA_LIBHADOOP_RPATH>
  672. </vars>
  673. </configuration>
  674. </execution>
  675. <execution>
  676. <id>test_bulk_crc32</id>
  677. <goals><goal>cmake-test</goal></goals>
  678. <phase>test</phase>
  679. <configuration>
  680. <binary>${project.build.directory}/native/test_bulk_crc32</binary>
  681. <timeout>1200</timeout>
  682. <results>${project.build.directory}/native-results</results>
  683. </configuration>
  684. </execution>
  685. <execution>
  686. <id>erasure_code_test</id>
  687. <goals><goal>cmake-test</goal></goals>
  688. <phase>test</phase>
  689. <configuration>
  690. <binary>${project.build.directory}/native/erasure_code_test</binary>
  691. <timeout>300</timeout>
  692. <results>${project.build.directory}/native-results</results>
  693. <skipIfMissing>true</skipIfMissing>
  694. <env>
  695. <LD_LIBRARY_PATH>${LD_LIBRARY_PATH}:${isal.lib}:${isal.prefix}:/usr/lib</LD_LIBRARY_PATH>
  696. </env>
  697. </configuration>
  698. </execution>
  699. </executions>
  700. </plugin>
  701. </plugins>
  702. </build>
  703. </profile>
  704. <profile>
  705. <id>native-win</id>
  706. <activation>
  707. <os>
  708. <family>Windows</family>
  709. </os>
  710. </activation>
  711. <properties>
  712. <snappy.prefix></snappy.prefix>
  713. <snappy.lib></snappy.lib>
  714. <snappy.include></snappy.include>
  715. <require.isal>false</require.isal>
  716. <isal.prefix></isal.prefix>
  717. <isal.lib></isal.lib>
  718. <require.snappy>false</require.snappy>
  719. <bundle.snappy.in.bin>true</bundle.snappy.in.bin>
  720. <openssl.prefix></openssl.prefix>
  721. <openssl.lib></openssl.lib>
  722. <openssl.include></openssl.include>
  723. <require.openssl>false</require.openssl>
  724. <runningWithNative>true</runningWithNative>
  725. <bundle.openssl.in.bin>false</bundle.openssl.in.bin>
  726. </properties>
  727. <build>
  728. <plugins>
  729. <plugin>
  730. <groupId>org.apache.maven.plugins</groupId>
  731. <artifactId>maven-enforcer-plugin</artifactId>
  732. <executions>
  733. <execution>
  734. <id>enforce-os</id>
  735. <goals>
  736. <goal>enforce</goal>
  737. </goals>
  738. <configuration>
  739. <rules>
  740. <requireOS>
  741. <family>windows</family>
  742. <message>native-win build only supported on Windows</message>
  743. </requireOS>
  744. </rules>
  745. <fail>true</fail>
  746. </configuration>
  747. </execution>
  748. </executions>
  749. </plugin>
  750. <plugin>
  751. <groupId>org.codehaus.mojo</groupId>
  752. <artifactId>native-maven-plugin</artifactId>
  753. <executions>
  754. <execution>
  755. <phase>compile</phase>
  756. <goals>
  757. <goal>javah</goal>
  758. </goals>
  759. <configuration>
  760. <javahPath>${env.JAVA_HOME}/bin/javah</javahPath>
  761. <javahClassNames>
  762. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibCompressor</javahClassName>
  763. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibDecompressor</javahClassName>
  764. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsMapping</javahClassName>
  765. <javahClassName>org.apache.hadoop.io.nativeio.NativeIO</javahClassName>
  766. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsNetgroupMapping</javahClassName>
  767. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyCompressor</javahClassName>
  768. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyDecompressor</javahClassName>
  769. <javahClassName>org.apache.hadoop.io.compress.lz4.Lz4Compressor</javahClassName>
  770. <javahClassName>org.apache.hadoop.io.compress.lz4.Lz4Decompressor</javahClassName>
  771. <javahClassName>org.apache.hadoop.io.erasurecode.ErasureCodeNative</javahClassName>
  772. <javahClassName>org.apache.hadoop.io.erasurecode.rawcoder.NativeRSRawEncoder</javahClassName>
  773. <javahClassName>org.apache.hadoop.io.erasurecode.rawcoder.NativeRSRawDecoder</javahClassName>
  774. <javahClassName>org.apache.hadoop.io.erasurecode.rawcoder.NativeXORRawEncoder</javahClassName>
  775. <javahClassName>org.apache.hadoop.io.erasurecode.rawcoder.NativeXORRawDecoder</javahClassName>
  776. <javahClassName>org.apache.hadoop.crypto.OpensslCipher</javahClassName>
  777. <javahClassName>org.apache.hadoop.crypto.random.OpensslSecureRandom</javahClassName>
  778. <javahClassName>org.apache.hadoop.util.NativeCrc32</javahClassName>
  779. </javahClassNames>
  780. <javahOutputDirectory>${project.build.directory}/native/javah</javahOutputDirectory>
  781. </configuration>
  782. </execution>
  783. </executions>
  784. </plugin>
  785. <plugin>
  786. <groupId>org.codehaus.mojo</groupId>
  787. <artifactId>exec-maven-plugin</artifactId>
  788. <executions>
  789. <execution>
  790. <id>compile-ms-winutils</id>
  791. <phase>compile</phase>
  792. <goals>
  793. <goal>exec</goal>
  794. </goals>
  795. <configuration>
  796. <executable>msbuild</executable>
  797. <arguments>
  798. <argument>${basedir}/src/main/winutils/winutils.sln</argument>
  799. <argument>/nologo</argument>
  800. <argument>/p:Configuration=Release</argument>
  801. <argument>/p:OutDir=${project.build.directory}/bin/</argument>
  802. <argument>/p:IntermediateOutputPath=${project.build.directory}/winutils/</argument>
  803. <argument>/p:WsceConfigDir=${wsce.config.dir}</argument>
  804. <argument>/p:WsceConfigFile=${wsce.config.file}</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:CustomOpensslPrefix=${openssl.prefix}</argument>
  826. <argument>/p:CustomOpensslLib=${openssl.lib}</argument>
  827. <argument>/p:CustomOpensslInclude=${openssl.include}</argument>
  828. <argument>/p:RequireOpenssl=${require.openssl}</argument>
  829. <argument>/p:RequireIsal=${require.isal}</argument>
  830. <argument>/p:CustomIsalPrefix=${isal.prefix}</argument>
  831. <argument>/p:CustomIsalLib=${isal.lib}</argument>
  832. </arguments>
  833. </configuration>
  834. </execution>
  835. </executions>
  836. </plugin>
  837. </plugins>
  838. </build>
  839. </profile>
  840. <!-- profile that starts ApacheDS KDC server -->
  841. <profile>
  842. <id>startKdc</id>
  843. <activation>
  844. <property>
  845. <name>startKdc</name>
  846. <value>true</value>
  847. </property>
  848. </activation>
  849. <build>
  850. <plugins>
  851. <plugin>
  852. <groupId>org.apache.maven.plugins</groupId>
  853. <artifactId>maven-enforcer-plugin</artifactId>
  854. <executions>
  855. <execution>
  856. <id>enforce-os</id>
  857. <goals>
  858. <goal>enforce</goal>
  859. </goals>
  860. <configuration>
  861. <rules>
  862. <!-- At present supports Mac and Unix OS family -->
  863. <requireOS>
  864. <family>mac</family>
  865. <family>unix</family>
  866. </requireOS>
  867. </rules>
  868. <fail>true</fail>
  869. </configuration>
  870. </execution>
  871. </executions>
  872. </plugin>
  873. <plugin>
  874. <groupId>org.apache.maven.plugins</groupId>
  875. <artifactId>maven-antrun-plugin</artifactId>
  876. <executions>
  877. <execution>
  878. <id>kdc</id>
  879. <phase>compile</phase>
  880. <goals>
  881. <goal>run</goal>
  882. </goals>
  883. <configuration>
  884. <target>
  885. <chmod file="${kdc.resource.dir}/killKdc.sh" perm="775" />
  886. <exec dir="${kdc.resource.dir}" executable= "./killKdc.sh" />
  887. <mkdir dir="${project.build.directory}/test-classes/kdc/downloads"/>
  888. <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"/>
  889. <untar src="${project.build.directory}/test-classes/kdc/downloads/apacheds-1.5.7.tar.gz" dest="${project.build.directory}/test-classes/kdc" compression="gzip" />
  890. <copy file="${kdc.resource.dir}/server.xml" toDir="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/conf"/>
  891. <mkdir dir="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/ldif"/>
  892. <copy toDir="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/ldif">
  893. <fileset dir="${kdc.resource.dir}/ldif"/>
  894. </copy>
  895. <chmod file="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/apacheds.sh" perm="775" />
  896. <exec dir="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/" executable="./apacheds.sh" spawn="true"/>
  897. </target>
  898. </configuration>
  899. </execution>
  900. <!-- On completion of graceful test phase: closes the ApacheDS KDC server -->
  901. <execution>
  902. <id>killKdc</id>
  903. <phase>test</phase>
  904. <goals>
  905. <goal>run</goal>
  906. </goals>
  907. <configuration>
  908. <target>
  909. <chmod file="${kdc.resource.dir}/killKdc.sh" perm="775" />
  910. <exec dir="${kdc.resource.dir}" executable= "./killKdc.sh" />
  911. </target>
  912. </configuration>
  913. </execution>
  914. </executions>
  915. </plugin>
  916. </plugins>
  917. </build>
  918. </profile>
  919. <profile>
  920. <id>parallel-tests</id>
  921. <build>
  922. <plugins>
  923. <plugin>
  924. <artifactId>maven-antrun-plugin</artifactId>
  925. <executions>
  926. <execution>
  927. <id>create-parallel-tests-dirs</id>
  928. <phase>test-compile</phase>
  929. <configuration>
  930. <target>
  931. <script language="javascript"><![CDATA[
  932. var baseDirs = [
  933. "${test.build.data}",
  934. "${test.build.dir}",
  935. "${hadoop.tmp.dir}" ];
  936. for (var i in baseDirs) {
  937. for (var j = 1; j <= ${testsThreadCount}; ++j) {
  938. var mkdir = project.createTask("mkdir");
  939. mkdir.setDir(new java.io.File(baseDirs[i], j));
  940. mkdir.perform();
  941. }
  942. }
  943. ]]></script>
  944. </target>
  945. </configuration>
  946. <goals>
  947. <goal>run</goal>
  948. </goals>
  949. </execution>
  950. </executions>
  951. </plugin>
  952. <plugin>
  953. <groupId>org.apache.maven.plugins</groupId>
  954. <artifactId>maven-surefire-plugin</artifactId>
  955. <configuration>
  956. <forkCount>${testsThreadCount}</forkCount>
  957. <reuseForks>false</reuseForks>
  958. <argLine>${maven-surefire-plugin.argLine} -DminiClusterDedicatedDirs=true</argLine>
  959. <systemPropertyVariables>
  960. <test.build.data>${test.build.data}/${surefire.forkNumber}</test.build.data>
  961. <test.build.dir>${test.build.dir}/${surefire.forkNumber}</test.build.dir>
  962. <hadoop.tmp.dir>${hadoop.tmp.dir}/${surefire.forkNumber}</hadoop.tmp.dir>
  963. <!-- Due to a Maven quirk, setting this to just -->
  964. <!-- surefire.forkNumber won't do the parameter substitution. -->
  965. <!-- Putting a prefix in front of it like "fork-" makes it -->
  966. <!-- work. -->
  967. <test.unique.fork.id>fork-${surefire.forkNumber}</test.unique.fork.id>
  968. </systemPropertyVariables>
  969. </configuration>
  970. </plugin>
  971. </plugins>
  972. </build>
  973. </profile>
  974. <profile>
  975. <id>releasedocs</id>
  976. <activation>
  977. <activeByDefault>false</activeByDefault>
  978. </activation>
  979. <build>
  980. <plugins>
  981. <plugin>
  982. <groupId>org.codehaus.mojo</groupId>
  983. <artifactId>exec-maven-plugin</artifactId>
  984. <executions>
  985. <execution>
  986. <id>releasedocs</id>
  987. <phase>pre-site</phase>
  988. <goals>
  989. <goal>exec</goal>
  990. </goals>
  991. <configuration>
  992. <executable>${basedir}/../../dev-support/bin/releasedocmaker</executable>
  993. <requiresOnline>true</requiresOnline>
  994. <arguments>
  995. <argument>--index</argument>
  996. <argument>--license</argument>
  997. <argument>--outputdir</argument>
  998. <argument>${basedir}/src/site/markdown/release</argument>
  999. <argument>--project</argument>
  1000. <argument>HADOOP</argument>
  1001. <argument>--project</argument>
  1002. <argument>HDFS</argument>
  1003. <argument>--project</argument>
  1004. <argument>MAPREDUCE</argument>
  1005. <argument>--project</argument>
  1006. <argument>YARN</argument>
  1007. <argument>--projecttitle</argument>
  1008. <argument>"Apache Hadoop"</argument>
  1009. <argument>--usetoday</argument>
  1010. <argument>--version</argument>
  1011. <argument>${project.version}</argument>
  1012. </arguments>
  1013. </configuration>
  1014. </execution>
  1015. </executions>
  1016. </plugin>
  1017. <plugin>
  1018. <artifactId>maven-clean-plugin</artifactId>
  1019. <configuration>
  1020. <filesets>
  1021. <fileset>
  1022. <directory>src/site/markdown/release</directory>
  1023. <includes>
  1024. <include>${project.version}/</include>
  1025. <include>index.md</include>
  1026. </includes>
  1027. <followSymlinks>false</followSymlinks>
  1028. </fileset>
  1029. </filesets>
  1030. </configuration>
  1031. </plugin>
  1032. </plugins>
  1033. </build>
  1034. </profile>
  1035. <!-- profile to test shell code -->
  1036. <profile>
  1037. <id>shelltest</id>
  1038. <activation>
  1039. <property>
  1040. <name>!skipTests</name>
  1041. </property>
  1042. </activation>
  1043. <build>
  1044. <plugins>
  1045. <plugin>
  1046. <artifactId>maven-antrun-plugin</artifactId>
  1047. <executions>
  1048. <execution>
  1049. <id>common-test-bats-driver</id>
  1050. <phase>test</phase>
  1051. <goals>
  1052. <goal>run</goal>
  1053. </goals>
  1054. <configuration>
  1055. <target>
  1056. <exec dir="src/test/scripts"
  1057. executable="bash"
  1058. failonerror="true">
  1059. <arg value="./run-bats.sh" />
  1060. </exec>
  1061. </target>
  1062. </configuration>
  1063. </execution>
  1064. </executions>
  1065. </plugin>
  1066. </plugins>
  1067. </build>
  1068. </profile>
  1069. </profiles>
  1070. </project>