pom.xml 41 KB

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