pom.xml 41 KB

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