pom.xml 41 KB

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