pom.xml 39 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025
  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.protobuf</groupId>
  191. <artifactId>protobuf-java</artifactId>
  192. <scope>compile</scope>
  193. </dependency>
  194. <dependency>
  195. <groupId>com.google.code.gson</groupId>
  196. <artifactId>gson</artifactId>
  197. </dependency>
  198. <dependency>
  199. <groupId>org.apache.hadoop</groupId>
  200. <artifactId>hadoop-auth</artifactId>
  201. <scope>compile</scope>
  202. </dependency>
  203. <dependency>
  204. <groupId>org.apache.hadoop</groupId>
  205. <artifactId>hadoop-common-client</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>python</executable>
  508. <workingDirectory>src/site/markdown</workingDirectory>
  509. <arguments>
  510. <argument>${basedir}/../../dev-support/shelldocs.py</argument>
  511. <argument>--skipprnorep</argument>
  512. <argument>--output</argument>
  513. <argument>${basedir}/src/site/markdown/UnixShellAPI.md</argument>
  514. <argument>--input</argument>
  515. <argument>${basedir}/src/main/bin/hadoop-functions.sh</argument>
  516. </arguments>
  517. </configuration>
  518. </execution>
  519. </executions>
  520. </plugin>
  521. <plugin>
  522. <artifactId>maven-clean-plugin</artifactId>
  523. <configuration>
  524. <filesets>
  525. <fileset>
  526. <directory>src/site/markdown</directory>
  527. <includes>
  528. <include>UnixShellAPI.md</include>
  529. </includes>
  530. <followSymlinks>false</followSymlinks>
  531. </fileset>
  532. <fileset>
  533. <directory>src/site/resources</directory>
  534. <includes>
  535. <include>configuration.xsl</include>
  536. <include>core-default.xml</include>
  537. </includes>
  538. <followSymlinks>false</followSymlinks>
  539. </fileset>
  540. </filesets>
  541. </configuration>
  542. </plugin>
  543. </plugins>
  544. </build>
  545. <profiles>
  546. <profile>
  547. <id>native</id>
  548. <activation>
  549. <activeByDefault>false</activeByDefault>
  550. </activation>
  551. <properties>
  552. <require.bzip2>false</require.bzip2>
  553. <snappy.prefix></snappy.prefix>
  554. <snappy.lib></snappy.lib>
  555. <snappy.include></snappy.include>
  556. <require.snappy>false</require.snappy>
  557. <openssl.prefix></openssl.prefix>
  558. <openssl.lib></openssl.lib>
  559. <openssl.include></openssl.include>
  560. <require.openssl>false</require.openssl>
  561. <runningWithNative>true</runningWithNative>
  562. <bundle.openssl.in.bin>false</bundle.openssl.in.bin>
  563. <extra.libhadoop.rpath></extra.libhadoop.rpath>
  564. </properties>
  565. <build>
  566. <plugins>
  567. <plugin>
  568. <groupId>org.apache.maven.plugins</groupId>
  569. <artifactId>maven-enforcer-plugin</artifactId>
  570. <executions>
  571. <execution>
  572. <id>enforce-os</id>
  573. <goals>
  574. <goal>enforce</goal>
  575. </goals>
  576. <configuration>
  577. <rules>
  578. <requireOS>
  579. <family>mac</family>
  580. <family>unix</family>
  581. <message>native build only supported on Mac or Unix</message>
  582. </requireOS>
  583. </rules>
  584. <fail>true</fail>
  585. </configuration>
  586. </execution>
  587. </executions>
  588. </plugin>
  589. <plugin>
  590. <groupId>org.codehaus.mojo</groupId>
  591. <artifactId>native-maven-plugin</artifactId>
  592. <executions>
  593. <execution>
  594. <phase>compile</phase>
  595. <goals>
  596. <goal>javah</goal>
  597. </goals>
  598. <configuration>
  599. <javahPath>${env.JAVA_HOME}/bin/javah</javahPath>
  600. <javahClassNames>
  601. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibCompressor</javahClassName>
  602. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibDecompressor</javahClassName>
  603. <javahClassName>org.apache.hadoop.io.compress.bzip2.Bzip2Compressor</javahClassName>
  604. <javahClassName>org.apache.hadoop.io.compress.bzip2.Bzip2Decompressor</javahClassName>
  605. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsMapping</javahClassName>
  606. <javahClassName>org.apache.hadoop.io.nativeio.NativeIO</javahClassName>
  607. <javahClassName>org.apache.hadoop.io.nativeio.SharedFileDescriptorFactory</javahClassName>
  608. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsNetgroupMapping</javahClassName>
  609. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyCompressor</javahClassName>
  610. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyDecompressor</javahClassName>
  611. <javahClassName>org.apache.hadoop.io.compress.lz4.Lz4Compressor</javahClassName>
  612. <javahClassName>org.apache.hadoop.io.compress.lz4.Lz4Decompressor</javahClassName>
  613. <javahClassName>org.apache.hadoop.crypto.OpensslCipher</javahClassName>
  614. <javahClassName>org.apache.hadoop.crypto.random.OpensslSecureRandom</javahClassName>
  615. <javahClassName>org.apache.hadoop.util.NativeCrc32</javahClassName>
  616. <javahClassName>org.apache.hadoop.net.unix.DomainSocket</javahClassName>
  617. <javahClassName>org.apache.hadoop.net.unix.DomainSocketWatcher</javahClassName>
  618. </javahClassNames>
  619. <javahOutputDirectory>${project.build.directory}/native/javah</javahOutputDirectory>
  620. </configuration>
  621. </execution>
  622. </executions>
  623. </plugin>
  624. <plugin>
  625. <groupId>org.apache.maven.plugins</groupId>
  626. <artifactId>maven-antrun-plugin</artifactId>
  627. <executions>
  628. <execution>
  629. <id>make</id>
  630. <phase>compile</phase>
  631. <goals><goal>run</goal></goals>
  632. <configuration>
  633. <target>
  634. <exec executable="cmake" dir="${project.build.directory}/native" failonerror="true">
  635. <arg line="${basedir}/src/ -DGENERATED_JAVAH=${project.build.directory}/native/javah -DJVM_ARCH_DATA_MODEL=${sun.arch.data.model} -DREQUIRE_BZIP2=${require.bzip2} -DREQUIRE_SNAPPY=${require.snappy} -DCUSTOM_SNAPPY_PREFIX=${snappy.prefix} -DCUSTOM_SNAPPY_LIB=${snappy.lib} -DCUSTOM_SNAPPY_INCLUDE=${snappy.include} -DREQUIRE_OPENSSL=${require.openssl} -DCUSTOM_OPENSSL_PREFIX=${openssl.prefix} -DCUSTOM_OPENSSL_LIB=${openssl.lib} -DCUSTOM_OPENSSL_INCLUDE=${openssl.include} -DEXTRA_LIBHADOOP_RPATH=${extra.libhadoop.rpath}"/>
  636. </exec>
  637. <exec executable="make" dir="${project.build.directory}/native" failonerror="true">
  638. <arg line="VERBOSE=1"/>
  639. </exec>
  640. <!-- The second make is a workaround for HADOOP-9215. It can
  641. be removed when version 2.6 of cmake is no longer supported . -->
  642. <exec executable="make" dir="${project.build.directory}/native" failonerror="true"></exec>
  643. </target>
  644. </configuration>
  645. </execution>
  646. <execution>
  647. <id>native_tests</id>
  648. <phase>test</phase>
  649. <goals><goal>run</goal></goals>
  650. <configuration>
  651. <target>
  652. <exec executable="${shell-executable}" failonerror="true" dir="${project.build.directory}/native">
  653. <arg value="-c"/>
  654. <arg value="[ x$SKIPTESTS = xtrue ] || ${project.build.directory}/native/test_bulk_crc32"/>
  655. <env key="SKIPTESTS" value="${skipTests}"/>
  656. </exec>
  657. </target>
  658. </configuration>
  659. </execution>
  660. </executions>
  661. </plugin>
  662. </plugins>
  663. </build>
  664. </profile>
  665. <profile>
  666. <id>native-win</id>
  667. <activation>
  668. <os>
  669. <family>Windows</family>
  670. </os>
  671. </activation>
  672. <properties>
  673. <snappy.prefix></snappy.prefix>
  674. <snappy.lib></snappy.lib>
  675. <snappy.include></snappy.include>
  676. <require.snappy>false</require.snappy>
  677. <bundle.snappy.in.bin>true</bundle.snappy.in.bin>
  678. <openssl.prefix></openssl.prefix>
  679. <openssl.lib></openssl.lib>
  680. <openssl.include></openssl.include>
  681. <require.openssl>false</require.openssl>
  682. <runningWithNative>true</runningWithNative>
  683. <bundle.openssl.in.bin>false</bundle.openssl.in.bin>
  684. </properties>
  685. <build>
  686. <plugins>
  687. <plugin>
  688. <groupId>org.apache.maven.plugins</groupId>
  689. <artifactId>maven-enforcer-plugin</artifactId>
  690. <executions>
  691. <execution>
  692. <id>enforce-os</id>
  693. <goals>
  694. <goal>enforce</goal>
  695. </goals>
  696. <configuration>
  697. <rules>
  698. <requireOS>
  699. <family>windows</family>
  700. <message>native-win build only supported on Windows</message>
  701. </requireOS>
  702. </rules>
  703. <fail>true</fail>
  704. </configuration>
  705. </execution>
  706. </executions>
  707. </plugin>
  708. <plugin>
  709. <groupId>org.codehaus.mojo</groupId>
  710. <artifactId>native-maven-plugin</artifactId>
  711. <executions>
  712. <execution>
  713. <phase>compile</phase>
  714. <goals>
  715. <goal>javah</goal>
  716. </goals>
  717. <configuration>
  718. <javahPath>${env.JAVA_HOME}/bin/javah</javahPath>
  719. <javahClassNames>
  720. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibCompressor</javahClassName>
  721. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibDecompressor</javahClassName>
  722. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsMapping</javahClassName>
  723. <javahClassName>org.apache.hadoop.io.nativeio.NativeIO</javahClassName>
  724. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsNetgroupMapping</javahClassName>
  725. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyCompressor</javahClassName>
  726. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyDecompressor</javahClassName>
  727. <javahClassName>org.apache.hadoop.io.compress.lz4.Lz4Compressor</javahClassName>
  728. <javahClassName>org.apache.hadoop.io.compress.lz4.Lz4Decompressor</javahClassName>
  729. <javahClassName>org.apache.hadoop.crypto.OpensslCipher</javahClassName>
  730. <javahClassName>org.apache.hadoop.crypto.random.OpensslSecureRandom</javahClassName>
  731. <javahClassName>org.apache.hadoop.util.NativeCrc32</javahClassName>
  732. </javahClassNames>
  733. <javahOutputDirectory>${project.build.directory}/native/javah</javahOutputDirectory>
  734. </configuration>
  735. </execution>
  736. </executions>
  737. </plugin>
  738. <plugin>
  739. <groupId>org.codehaus.mojo</groupId>
  740. <artifactId>exec-maven-plugin</artifactId>
  741. <executions>
  742. <execution>
  743. <id>compile-ms-winutils</id>
  744. <phase>compile</phase>
  745. <goals>
  746. <goal>exec</goal>
  747. </goals>
  748. <configuration>
  749. <executable>msbuild</executable>
  750. <arguments>
  751. <argument>${basedir}/src/main/winutils/winutils.sln</argument>
  752. <argument>/nologo</argument>
  753. <argument>/p:Configuration=Release</argument>
  754. <argument>/p:OutDir=${project.build.directory}/bin/</argument>
  755. <argument>/p:IntermediateOutputPath=${project.build.directory}/winutils/</argument>
  756. <argument>/p:WsceConfigDir=${wsce.config.dir}</argument>
  757. <argument>/p:WsceConfigFile=${wsce.config.file}</argument>
  758. </arguments>
  759. </configuration>
  760. </execution>
  761. <execution>
  762. <id>compile-ms-native-dll</id>
  763. <phase>compile</phase>
  764. <goals>
  765. <goal>exec</goal>
  766. </goals>
  767. <configuration>
  768. <executable>msbuild</executable>
  769. <arguments>
  770. <argument>${basedir}/src/main/native/native.sln</argument>
  771. <argument>/nologo</argument>
  772. <argument>/p:Configuration=Release</argument>
  773. <argument>/p:OutDir=${project.build.directory}/bin/</argument>
  774. <argument>/p:CustomSnappyPrefix=${snappy.prefix}</argument>
  775. <argument>/p:CustomSnappyLib=${snappy.lib}</argument>
  776. <argument>/p:CustomSnappyInclude=${snappy.include}</argument>
  777. <argument>/p:RequireSnappy=${require.snappy}</argument>
  778. <argument>/p:CustomOpensslPrefix=${openssl.prefix}</argument>
  779. <argument>/p:CustomOpensslLib=${openssl.lib}</argument>
  780. <argument>/p:CustomOpensslInclude=${openssl.include}</argument>
  781. <argument>/p:RequireOpenssl=${require.openssl}</argument>
  782. </arguments>
  783. </configuration>
  784. </execution>
  785. </executions>
  786. </plugin>
  787. </plugins>
  788. </build>
  789. </profile>
  790. <!-- profile that starts ApacheDS KDC server -->
  791. <profile>
  792. <id>startKdc</id>
  793. <activation>
  794. <property>
  795. <name>startKdc</name>
  796. <value>true</value>
  797. </property>
  798. </activation>
  799. <build>
  800. <plugins>
  801. <plugin>
  802. <groupId>org.apache.maven.plugins</groupId>
  803. <artifactId>maven-enforcer-plugin</artifactId>
  804. <executions>
  805. <execution>
  806. <id>enforce-os</id>
  807. <goals>
  808. <goal>enforce</goal>
  809. </goals>
  810. <configuration>
  811. <rules>
  812. <!-- At present supports Mac and Unix OS family -->
  813. <requireOS>
  814. <family>mac</family>
  815. <family>unix</family>
  816. </requireOS>
  817. </rules>
  818. <fail>true</fail>
  819. </configuration>
  820. </execution>
  821. </executions>
  822. </plugin>
  823. <plugin>
  824. <groupId>org.apache.maven.plugins</groupId>
  825. <artifactId>maven-antrun-plugin</artifactId>
  826. <executions>
  827. <execution>
  828. <id>kdc</id>
  829. <phase>compile</phase>
  830. <goals>
  831. <goal>run</goal>
  832. </goals>
  833. <configuration>
  834. <target>
  835. <chmod file="${kdc.resource.dir}/killKdc.sh" perm="775" />
  836. <exec dir="${kdc.resource.dir}" executable= "./killKdc.sh" />
  837. <mkdir dir="${project.build.directory}/test-classes/kdc/downloads"/>
  838. <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"/>
  839. <untar src="${project.build.directory}/test-classes/kdc/downloads/apacheds-1.5.7.tar.gz" dest="${project.build.directory}/test-classes/kdc" compression="gzip" />
  840. <copy file="${kdc.resource.dir}/server.xml" toDir="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/conf"/>
  841. <mkdir dir="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/ldif"/>
  842. <copy toDir="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/ldif">
  843. <fileset dir="${kdc.resource.dir}/ldif"/>
  844. </copy>
  845. <chmod file="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/apacheds.sh" perm="775" />
  846. <exec dir="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/" executable="./apacheds.sh" spawn="true"/>
  847. </target>
  848. </configuration>
  849. </execution>
  850. <!-- On completion of graceful test phase: closes the ApacheDS KDC server -->
  851. <execution>
  852. <id>killKdc</id>
  853. <phase>test</phase>
  854. <goals>
  855. <goal>run</goal>
  856. </goals>
  857. <configuration>
  858. <target>
  859. <chmod file="${kdc.resource.dir}/killKdc.sh" perm="775" />
  860. <exec dir="${kdc.resource.dir}" executable= "./killKdc.sh" />
  861. </target>
  862. </configuration>
  863. </execution>
  864. </executions>
  865. </plugin>
  866. </plugins>
  867. </build>
  868. </profile>
  869. <profile>
  870. <id>parallel-tests</id>
  871. <build>
  872. <plugins>
  873. <plugin>
  874. <artifactId>maven-antrun-plugin</artifactId>
  875. <executions>
  876. <execution>
  877. <id>create-parallel-tests-dirs</id>
  878. <phase>test-compile</phase>
  879. <configuration>
  880. <target>
  881. <script language="javascript"><![CDATA[
  882. var baseDirs = [
  883. "${test.build.data}",
  884. "${test.build.dir}",
  885. "${hadoop.tmp.dir}" ];
  886. for (var i in baseDirs) {
  887. for (var j = 1; j <= ${testsThreadCount}; ++j) {
  888. var mkdir = project.createTask("mkdir");
  889. mkdir.setDir(new java.io.File(baseDirs[i], j));
  890. mkdir.perform();
  891. }
  892. }
  893. ]]></script>
  894. </target>
  895. </configuration>
  896. <goals>
  897. <goal>run</goal>
  898. </goals>
  899. </execution>
  900. </executions>
  901. </plugin>
  902. <plugin>
  903. <groupId>org.apache.maven.plugins</groupId>
  904. <artifactId>maven-surefire-plugin</artifactId>
  905. <configuration>
  906. <forkCount>${testsThreadCount}</forkCount>
  907. <reuseForks>false</reuseForks>
  908. <argLine>${maven-surefire-plugin.argLine} -DminiClusterDedicatedDirs=true</argLine>
  909. <systemPropertyVariables>
  910. <test.build.data>${test.build.data}/${surefire.forkNumber}</test.build.data>
  911. <test.build.dir>${test.build.dir}/${surefire.forkNumber}</test.build.dir>
  912. <hadoop.tmp.dir>${hadoop.tmp.dir}/${surefire.forkNumber}</hadoop.tmp.dir>
  913. <!-- Due to a Maven quirk, setting this to just -->
  914. <!-- surefire.forkNumber won't do the parameter substitution. -->
  915. <!-- Putting a prefix in front of it like "fork-" makes it -->
  916. <!-- work. -->
  917. <test.unique.fork.id>fork-${surefire.forkNumber}</test.unique.fork.id>
  918. </systemPropertyVariables>
  919. </configuration>
  920. </plugin>
  921. </plugins>
  922. </build>
  923. </profile>
  924. <profile>
  925. <id>releasedocs</id>
  926. <activation>
  927. <activeByDefault>false</activeByDefault>
  928. </activation>
  929. <build>
  930. <plugins>
  931. <plugin>
  932. <groupId>org.codehaus.mojo</groupId>
  933. <artifactId>exec-maven-plugin</artifactId>
  934. <executions>
  935. <execution>
  936. <id>releasedocs</id>
  937. <phase>pre-site</phase>
  938. <goals>
  939. <goal>exec</goal>
  940. </goals>
  941. <configuration>
  942. <executable>python</executable>
  943. <workingDirectory>src/site/markdown/release/</workingDirectory>
  944. <requiresOnline>true</requiresOnline>
  945. <arguments>
  946. <argument>${basedir}/../../dev-support/releasedocmaker.py</argument>
  947. <argument>--version</argument>
  948. <argument>${project.version}</argument>
  949. <argument>--index</argument>
  950. <argument>--usetoday</argument>
  951. </arguments>
  952. </configuration>
  953. </execution>
  954. </executions>
  955. </plugin>
  956. <plugin>
  957. <artifactId>maven-clean-plugin</artifactId>
  958. <configuration>
  959. <filesets>
  960. <fileset>
  961. <directory>src/site/markdown/release</directory>
  962. <includes>
  963. <include>${project.version}/</include>
  964. <include>index.md</include>
  965. </includes>
  966. <followSymlinks>false</followSymlinks>
  967. </fileset>
  968. </filesets>
  969. </configuration>
  970. </plugin>
  971. </plugins>
  972. </build>
  973. </profile>
  974. <!-- profile to test shell code -->
  975. <profile>
  976. <id>shelltest</id>
  977. <activation>
  978. <activeByDefault>true</activeByDefault>
  979. </activation>
  980. <build>
  981. <plugins>
  982. <plugin>
  983. <artifactId>maven-antrun-plugin</artifactId>
  984. <executions>
  985. <execution>
  986. <id>common-test-bats-driver</id>
  987. <phase>process-test-classes</phase>
  988. <goals>
  989. <goal>run</goal>
  990. </goals>
  991. <configuration>
  992. <target>
  993. <exec dir="src/test/scripts"
  994. executable="bash"
  995. failonerror="true">
  996. <arg value="./run-bats.sh" />
  997. </exec>
  998. </target>
  999. </configuration>
  1000. </execution>
  1001. </executions>
  1002. </plugin>
  1003. </plugins>
  1004. </build>
  1005. </profile>
  1006. </profiles>
  1007. </project>