pom.xml 43 KB

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