pom.xml 42 KB

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