pom.xml 41 KB

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