pom.xml 41 KB

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