pom.xml 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979
  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-auth</artifactId>
  206. <type>test-jar</type>
  207. <scope>test</scope>
  208. </dependency>
  209. <dependency>
  210. <groupId>org.apache.hadoop</groupId>
  211. <artifactId>hadoop-minikdc</artifactId>
  212. <scope>test</scope>
  213. </dependency>
  214. <dependency>
  215. <groupId>com.jcraft</groupId>
  216. <artifactId>jsch</artifactId>
  217. </dependency>
  218. <dependency>
  219. <groupId>org.apache.curator</groupId>
  220. <artifactId>curator-test</artifactId>
  221. <scope>test</scope>
  222. </dependency>
  223. <dependency>
  224. <groupId>org.apache.curator</groupId>
  225. <artifactId>curator-client</artifactId>
  226. </dependency>
  227. <dependency>
  228. <groupId>org.apache.curator</groupId>
  229. <artifactId>curator-recipes</artifactId>
  230. </dependency>
  231. <dependency>
  232. <groupId>com.google.code.findbugs</groupId>
  233. <artifactId>jsr305</artifactId>
  234. <scope>compile</scope>
  235. </dependency>
  236. <dependency>
  237. <groupId>org.apache.sshd</groupId>
  238. <artifactId>sshd-core</artifactId>
  239. <scope>test</scope>
  240. </dependency>
  241. <dependency>
  242. <groupId>org.apache.htrace</groupId>
  243. <artifactId>htrace-core</artifactId>
  244. </dependency>
  245. <dependency>
  246. <groupId>org.apache.zookeeper</groupId>
  247. <artifactId>zookeeper</artifactId>
  248. <exclusions>
  249. <exclusion>
  250. <groupId>jline</groupId>
  251. <artifactId>jline</artifactId>
  252. </exclusion>
  253. <exclusion>
  254. <groupId>org.jboss.netty</groupId>
  255. <artifactId>netty</artifactId>
  256. </exclusion>
  257. <exclusion>
  258. <!-- otherwise seems to drag in junit 3.8.1 via jline -->
  259. <groupId>junit</groupId>
  260. <artifactId>junit</artifactId>
  261. </exclusion>
  262. <exclusion>
  263. <groupId>com.sun.jdmk</groupId>
  264. <artifactId>jmxtools</artifactId>
  265. </exclusion>
  266. <exclusion>
  267. <groupId>com.sun.jmx</groupId>
  268. <artifactId>jmxri</artifactId>
  269. </exclusion>
  270. </exclusions>
  271. </dependency>
  272. <dependency>
  273. <groupId>org.apache.zookeeper</groupId>
  274. <artifactId>zookeeper</artifactId>
  275. <type>test-jar</type>
  276. <scope>test</scope>
  277. </dependency>
  278. <dependency>
  279. <groupId>org.apache.commons</groupId>
  280. <artifactId>commons-compress</artifactId>
  281. </dependency>
  282. <dependency>
  283. <groupId>org.bouncycastle</groupId>
  284. <artifactId>bcprov-jdk16</artifactId>
  285. <scope>test</scope>
  286. </dependency>
  287. </dependencies>
  288. <build>
  289. <!--
  290. Include all files in src/main/resources. By default, do not apply property
  291. substitution (filtering=false), but do apply property substitution to
  292. common-version-info.properties (filtering=true). This will substitute the
  293. version information correctly, but prevent Maven from altering other files
  294. like core-default.xml.
  295. -->
  296. <resources>
  297. <resource>
  298. <directory>${basedir}/src/main/resources</directory>
  299. <excludes>
  300. <exclude>common-version-info.properties</exclude>
  301. </excludes>
  302. <filtering>false</filtering>
  303. </resource>
  304. <resource>
  305. <directory>${basedir}/src/main/resources</directory>
  306. <includes>
  307. <include>common-version-info.properties</include>
  308. </includes>
  309. <filtering>true</filtering>
  310. </resource>
  311. </resources>
  312. <plugins>
  313. <plugin>
  314. <groupId>org.apache.hadoop</groupId>
  315. <artifactId>hadoop-maven-plugins</artifactId>
  316. <executions>
  317. <execution>
  318. <id>version-info</id>
  319. <phase>generate-resources</phase>
  320. <goals>
  321. <goal>version-info</goal>
  322. </goals>
  323. <configuration>
  324. <source>
  325. <directory>${basedir}/src/main</directory>
  326. <includes>
  327. <include>java/**/*.java</include>
  328. <include>proto/**/*.proto</include>
  329. </includes>
  330. </source>
  331. </configuration>
  332. </execution>
  333. <execution>
  334. <id>compile-protoc</id>
  335. <phase>generate-sources</phase>
  336. <goals>
  337. <goal>protoc</goal>
  338. </goals>
  339. <configuration>
  340. <protocVersion>${protobuf.version}</protocVersion>
  341. <protocCommand>${protoc.path}</protocCommand>
  342. <imports>
  343. <param>${basedir}/src/main/proto</param>
  344. </imports>
  345. <source>
  346. <directory>${basedir}/src/main/proto</directory>
  347. <includes>
  348. <include>HAServiceProtocol.proto</include>
  349. <include>IpcConnectionContext.proto</include>
  350. <include>ProtocolInfo.proto</include>
  351. <include>RpcHeader.proto</include>
  352. <include>ZKFCProtocol.proto</include>
  353. <include>ProtobufRpcEngine.proto</include>
  354. <include>Security.proto</include>
  355. <include>GetUserMappingsProtocol.proto</include>
  356. <include>TraceAdmin.proto</include>
  357. <include>RefreshAuthorizationPolicyProtocol.proto</include>
  358. <include>RefreshUserMappingsProtocol.proto</include>
  359. <include>RefreshCallQueueProtocol.proto</include>
  360. <include>GenericRefreshProtocol.proto</include>
  361. </includes>
  362. </source>
  363. <output>${project.build.directory}/generated-sources/java</output>
  364. </configuration>
  365. </execution>
  366. <execution>
  367. <id>compile-test-protoc</id>
  368. <phase>generate-test-sources</phase>
  369. <goals>
  370. <goal>protoc</goal>
  371. </goals>
  372. <configuration>
  373. <protocVersion>${protobuf.version}</protocVersion>
  374. <protocCommand>${protoc.path}</protocCommand>
  375. <imports>
  376. <param>${basedir}/src/test/proto</param>
  377. </imports>
  378. <source>
  379. <directory>${basedir}/src/test/proto</directory>
  380. <includes>
  381. <include>test.proto</include>
  382. <include>test_rpc_service.proto</include>
  383. </includes>
  384. </source>
  385. <output>${project.build.directory}/generated-test-sources/java</output>
  386. </configuration>
  387. </execution>
  388. </executions>
  389. </plugin>
  390. <plugin>
  391. <groupId>org.apache.maven.plugins</groupId>
  392. <artifactId>maven-surefire-plugin</artifactId>
  393. <configuration>
  394. <systemPropertyVariables>
  395. <startKdc>${startKdc}</startKdc>
  396. <kdc.resource.dir>${kdc.resource.dir}</kdc.resource.dir>
  397. <runningWithNative>${runningWithNative}</runningWithNative>
  398. </systemPropertyVariables>
  399. <properties>
  400. <property>
  401. <name>listener</name>
  402. <value>org.apache.hadoop.test.TimedOutTestsListener</value>
  403. </property>
  404. </properties>
  405. </configuration>
  406. </plugin>
  407. <plugin>
  408. <groupId>org.apache.avro</groupId>
  409. <artifactId>avro-maven-plugin</artifactId>
  410. <executions>
  411. <execution>
  412. <id>generate-avro-test-sources</id>
  413. <phase>generate-test-sources</phase>
  414. <goals>
  415. <goal>schema</goal>
  416. </goals>
  417. </execution>
  418. </executions>
  419. <configuration>
  420. <testOutputDirectory>${project.build.directory}/generated-test-sources/java</testOutputDirectory>
  421. </configuration>
  422. </plugin>
  423. <plugin>
  424. <groupId>org.apache.maven.plugins</groupId>
  425. <artifactId>maven-antrun-plugin</artifactId>
  426. <executions>
  427. <execution>
  428. <id>create-log-dir</id>
  429. <phase>process-test-resources</phase>
  430. <goals>
  431. <goal>run</goal>
  432. </goals>
  433. <configuration>
  434. <target>
  435. <!--
  436. TODO: there are tests (TestLocalFileSystem#testCopy) that fail if data
  437. TODO: from a previous run is present
  438. -->
  439. <delete dir="${test.build.data}"/>
  440. <mkdir dir="${test.build.data}"/>
  441. <mkdir dir="${hadoop.log.dir}"/>
  442. <copy toDir="${project.build.directory}/test-classes">
  443. <fileset dir="${basedir}/src/main/conf"/>
  444. </copy>
  445. </target>
  446. </configuration>
  447. </execution>
  448. <execution>
  449. <phase>pre-site</phase>
  450. <goals>
  451. <goal>run</goal>
  452. </goals>
  453. <configuration>
  454. <target>
  455. <copy file="src/main/resources/core-default.xml" todir="src/site/resources"/>
  456. <copy file="src/main/xsl/configuration.xsl" todir="src/site/resources"/>
  457. </target>
  458. </configuration>
  459. </execution>
  460. </executions>
  461. </plugin>
  462. <plugin>
  463. <groupId>org.apache.rat</groupId>
  464. <artifactId>apache-rat-plugin</artifactId>
  465. <configuration>
  466. <excludes>
  467. <exclude>CHANGES.txt</exclude>
  468. <exclude>.idea/**</exclude>
  469. <exclude>src/main/conf/*</exclude>
  470. <exclude>dev-support/jdiff/**</exclude>
  471. <exclude>src/main/native/*</exclude>
  472. <exclude>src/main/native/config/*</exclude>
  473. <exclude>src/main/native/m4/*</exclude>
  474. <exclude>src/test/empty-file</exclude>
  475. <exclude>src/test/all-tests</exclude>
  476. <exclude>src/test/resources/kdc/ldif/users.ldif</exclude>
  477. <exclude>src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4.h</exclude>
  478. <exclude>src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4.c</exclude>
  479. <exclude>src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4hc.h</exclude>
  480. <exclude>src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4hc.c</exclude>
  481. <exclude>src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4hc_encoder.h</exclude>
  482. <exclude>src/test/resources/test-untar.tgz</exclude>
  483. <exclude>src/test/resources/test.har/_SUCCESS</exclude>
  484. <exclude>src/test/resources/test.har/_index</exclude>
  485. <exclude>src/test/resources/test.har/_masterindex</exclude>
  486. <exclude>src/test/resources/test.har/part-0</exclude>
  487. <exclude>src/test/resources/javakeystoreprovider.password</exclude>
  488. </excludes>
  489. </configuration>
  490. </plugin>
  491. <plugin>
  492. <groupId>org.codehaus.mojo</groupId>
  493. <artifactId>exec-maven-plugin</artifactId>
  494. <executions>
  495. <execution>
  496. <id>shelldocs</id>
  497. <phase>pre-site</phase>
  498. <goals>
  499. <goal>exec</goal>
  500. </goals>
  501. <configuration>
  502. <executable>python</executable>
  503. <workingDirectory>src/site/markdown</workingDirectory>
  504. <arguments>
  505. <argument>${basedir}/../../dev-support/shelldocs.py</argument>
  506. <argument>--skipprnorep</argument>
  507. <argument>--output</argument>
  508. <argument>${basedir}/src/site/markdown/UnixShellAPI.md</argument>
  509. <argument>--input</argument>
  510. <argument>${basedir}/src/main/bin/hadoop-functions.sh</argument>
  511. </arguments>
  512. </configuration>
  513. </execution>
  514. </executions>
  515. </plugin>
  516. <plugin>
  517. <artifactId>maven-clean-plugin</artifactId>
  518. <configuration>
  519. <filesets>
  520. <fileset>
  521. <directory>src/site/markdown</directory>
  522. <includes>
  523. <include>UnixShellAPI.md</include>
  524. </includes>
  525. <followSymlinks>false</followSymlinks>
  526. </fileset>
  527. <fileset>
  528. <directory>src/site/resources</directory>
  529. <includes>
  530. <include>configuration.xsl</include>
  531. <include>core-default.xml</include>
  532. </includes>
  533. <followSymlinks>false</followSymlinks>
  534. </fileset>
  535. </filesets>
  536. </configuration>
  537. </plugin>
  538. </plugins>
  539. </build>
  540. <profiles>
  541. <profile>
  542. <id>native</id>
  543. <activation>
  544. <activeByDefault>false</activeByDefault>
  545. </activation>
  546. <properties>
  547. <require.bzip2>false</require.bzip2>
  548. <snappy.prefix></snappy.prefix>
  549. <snappy.lib></snappy.lib>
  550. <snappy.include></snappy.include>
  551. <require.snappy>false</require.snappy>
  552. <openssl.prefix></openssl.prefix>
  553. <openssl.lib></openssl.lib>
  554. <openssl.include></openssl.include>
  555. <require.openssl>false</require.openssl>
  556. <runningWithNative>true</runningWithNative>
  557. <bundle.openssl.in.bin>false</bundle.openssl.in.bin>
  558. <extra.libhadoop.rpath></extra.libhadoop.rpath>
  559. </properties>
  560. <build>
  561. <plugins>
  562. <plugin>
  563. <groupId>org.apache.maven.plugins</groupId>
  564. <artifactId>maven-enforcer-plugin</artifactId>
  565. <executions>
  566. <execution>
  567. <id>enforce-os</id>
  568. <goals>
  569. <goal>enforce</goal>
  570. </goals>
  571. <configuration>
  572. <rules>
  573. <requireOS>
  574. <family>mac</family>
  575. <family>unix</family>
  576. <message>native build only supported on Mac or Unix</message>
  577. </requireOS>
  578. </rules>
  579. <fail>true</fail>
  580. </configuration>
  581. </execution>
  582. </executions>
  583. </plugin>
  584. <plugin>
  585. <groupId>org.codehaus.mojo</groupId>
  586. <artifactId>native-maven-plugin</artifactId>
  587. <executions>
  588. <execution>
  589. <phase>compile</phase>
  590. <goals>
  591. <goal>javah</goal>
  592. </goals>
  593. <configuration>
  594. <javahPath>${env.JAVA_HOME}/bin/javah</javahPath>
  595. <javahClassNames>
  596. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibCompressor</javahClassName>
  597. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibDecompressor</javahClassName>
  598. <javahClassName>org.apache.hadoop.io.compress.bzip2.Bzip2Compressor</javahClassName>
  599. <javahClassName>org.apache.hadoop.io.compress.bzip2.Bzip2Decompressor</javahClassName>
  600. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsMapping</javahClassName>
  601. <javahClassName>org.apache.hadoop.io.nativeio.NativeIO</javahClassName>
  602. <javahClassName>org.apache.hadoop.io.nativeio.SharedFileDescriptorFactory</javahClassName>
  603. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsNetgroupMapping</javahClassName>
  604. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyCompressor</javahClassName>
  605. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyDecompressor</javahClassName>
  606. <javahClassName>org.apache.hadoop.io.compress.lz4.Lz4Compressor</javahClassName>
  607. <javahClassName>org.apache.hadoop.io.compress.lz4.Lz4Decompressor</javahClassName>
  608. <javahClassName>org.apache.hadoop.crypto.OpensslCipher</javahClassName>
  609. <javahClassName>org.apache.hadoop.crypto.random.OpensslSecureRandom</javahClassName>
  610. <javahClassName>org.apache.hadoop.util.NativeCrc32</javahClassName>
  611. <javahClassName>org.apache.hadoop.net.unix.DomainSocket</javahClassName>
  612. <javahClassName>org.apache.hadoop.net.unix.DomainSocketWatcher</javahClassName>
  613. </javahClassNames>
  614. <javahOutputDirectory>${project.build.directory}/native/javah</javahOutputDirectory>
  615. </configuration>
  616. </execution>
  617. </executions>
  618. </plugin>
  619. <plugin>
  620. <groupId>org.apache.maven.plugins</groupId>
  621. <artifactId>maven-antrun-plugin</artifactId>
  622. <executions>
  623. <execution>
  624. <id>make</id>
  625. <phase>compile</phase>
  626. <goals><goal>run</goal></goals>
  627. <configuration>
  628. <target>
  629. <exec executable="cmake" dir="${project.build.directory}/native" failonerror="true">
  630. <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}"/>
  631. </exec>
  632. <exec executable="make" dir="${project.build.directory}/native" failonerror="true">
  633. <arg line="VERBOSE=1"/>
  634. </exec>
  635. <!-- The second make is a workaround for HADOOP-9215. It can
  636. be removed when version 2.6 of cmake is no longer supported . -->
  637. <exec executable="make" dir="${project.build.directory}/native" failonerror="true"></exec>
  638. </target>
  639. </configuration>
  640. </execution>
  641. <execution>
  642. <id>native_tests</id>
  643. <phase>test</phase>
  644. <goals><goal>run</goal></goals>
  645. <configuration>
  646. <target>
  647. <exec executable="${shell-executable}" failonerror="true" dir="${project.build.directory}/native">
  648. <arg value="-c"/>
  649. <arg value="[ x$SKIPTESTS = xtrue ] || ${project.build.directory}/native/test_bulk_crc32"/>
  650. <env key="SKIPTESTS" value="${skipTests}"/>
  651. </exec>
  652. </target>
  653. </configuration>
  654. </execution>
  655. </executions>
  656. </plugin>
  657. </plugins>
  658. </build>
  659. </profile>
  660. <profile>
  661. <id>native-win</id>
  662. <activation>
  663. <os>
  664. <family>Windows</family>
  665. </os>
  666. </activation>
  667. <properties>
  668. <snappy.prefix></snappy.prefix>
  669. <snappy.lib></snappy.lib>
  670. <snappy.include></snappy.include>
  671. <require.snappy>false</require.snappy>
  672. <bundle.snappy.in.bin>true</bundle.snappy.in.bin>
  673. <openssl.prefix></openssl.prefix>
  674. <openssl.lib></openssl.lib>
  675. <openssl.include></openssl.include>
  676. <require.openssl>false</require.openssl>
  677. <runningWithNative>true</runningWithNative>
  678. <bundle.openssl.in.bin>false</bundle.openssl.in.bin>
  679. </properties>
  680. <build>
  681. <plugins>
  682. <plugin>
  683. <groupId>org.apache.maven.plugins</groupId>
  684. <artifactId>maven-enforcer-plugin</artifactId>
  685. <executions>
  686. <execution>
  687. <id>enforce-os</id>
  688. <goals>
  689. <goal>enforce</goal>
  690. </goals>
  691. <configuration>
  692. <rules>
  693. <requireOS>
  694. <family>windows</family>
  695. <message>native-win build only supported on Windows</message>
  696. </requireOS>
  697. </rules>
  698. <fail>true</fail>
  699. </configuration>
  700. </execution>
  701. </executions>
  702. </plugin>
  703. <plugin>
  704. <groupId>org.codehaus.mojo</groupId>
  705. <artifactId>native-maven-plugin</artifactId>
  706. <executions>
  707. <execution>
  708. <phase>compile</phase>
  709. <goals>
  710. <goal>javah</goal>
  711. </goals>
  712. <configuration>
  713. <javahPath>${env.JAVA_HOME}/bin/javah</javahPath>
  714. <javahClassNames>
  715. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibCompressor</javahClassName>
  716. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibDecompressor</javahClassName>
  717. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsMapping</javahClassName>
  718. <javahClassName>org.apache.hadoop.io.nativeio.NativeIO</javahClassName>
  719. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsNetgroupMapping</javahClassName>
  720. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyCompressor</javahClassName>
  721. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyDecompressor</javahClassName>
  722. <javahClassName>org.apache.hadoop.io.compress.lz4.Lz4Compressor</javahClassName>
  723. <javahClassName>org.apache.hadoop.io.compress.lz4.Lz4Decompressor</javahClassName>
  724. <javahClassName>org.apache.hadoop.crypto.OpensslCipher</javahClassName>
  725. <javahClassName>org.apache.hadoop.crypto.random.OpensslSecureRandom</javahClassName>
  726. <javahClassName>org.apache.hadoop.util.NativeCrc32</javahClassName>
  727. </javahClassNames>
  728. <javahOutputDirectory>${project.build.directory}/native/javah</javahOutputDirectory>
  729. </configuration>
  730. </execution>
  731. </executions>
  732. </plugin>
  733. <plugin>
  734. <groupId>org.codehaus.mojo</groupId>
  735. <artifactId>exec-maven-plugin</artifactId>
  736. <executions>
  737. <execution>
  738. <id>compile-ms-winutils</id>
  739. <phase>compile</phase>
  740. <goals>
  741. <goal>exec</goal>
  742. </goals>
  743. <configuration>
  744. <executable>msbuild</executable>
  745. <arguments>
  746. <argument>${basedir}/src/main/winutils/winutils.sln</argument>
  747. <argument>/nologo</argument>
  748. <argument>/p:Configuration=Release</argument>
  749. <argument>/p:OutDir=${project.build.directory}/bin/</argument>
  750. <argument>/p:IntermediateOutputPath=${project.build.directory}/winutils/</argument>
  751. <argument>/p:WsceConfigDir=${wsce.config.dir}</argument>
  752. <argument>/p:WsceConfigFile=${wsce.config.file}</argument>
  753. </arguments>
  754. </configuration>
  755. </execution>
  756. <execution>
  757. <id>compile-ms-native-dll</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/native/native.sln</argument>
  766. <argument>/nologo</argument>
  767. <argument>/p:Configuration=Release</argument>
  768. <argument>/p:OutDir=${project.build.directory}/bin/</argument>
  769. <argument>/p:CustomSnappyPrefix=${snappy.prefix}</argument>
  770. <argument>/p:CustomSnappyLib=${snappy.lib}</argument>
  771. <argument>/p:CustomSnappyInclude=${snappy.include}</argument>
  772. <argument>/p:RequireSnappy=${require.snappy}</argument>
  773. <argument>/p:CustomOpensslPrefix=${openssl.prefix}</argument>
  774. <argument>/p:CustomOpensslLib=${openssl.lib}</argument>
  775. <argument>/p:CustomOpensslInclude=${openssl.include}</argument>
  776. <argument>/p:RequireOpenssl=${require.openssl}</argument>
  777. </arguments>
  778. </configuration>
  779. </execution>
  780. </executions>
  781. </plugin>
  782. </plugins>
  783. </build>
  784. </profile>
  785. <!-- profile that starts ApacheDS KDC server -->
  786. <profile>
  787. <id>startKdc</id>
  788. <activation>
  789. <property>
  790. <name>startKdc</name>
  791. <value>true</value>
  792. </property>
  793. </activation>
  794. <build>
  795. <plugins>
  796. <plugin>
  797. <groupId>org.apache.maven.plugins</groupId>
  798. <artifactId>maven-enforcer-plugin</artifactId>
  799. <executions>
  800. <execution>
  801. <id>enforce-os</id>
  802. <goals>
  803. <goal>enforce</goal>
  804. </goals>
  805. <configuration>
  806. <rules>
  807. <!-- At present supports Mac and Unix OS family -->
  808. <requireOS>
  809. <family>mac</family>
  810. <family>unix</family>
  811. </requireOS>
  812. </rules>
  813. <fail>true</fail>
  814. </configuration>
  815. </execution>
  816. </executions>
  817. </plugin>
  818. <plugin>
  819. <groupId>org.apache.maven.plugins</groupId>
  820. <artifactId>maven-antrun-plugin</artifactId>
  821. <executions>
  822. <execution>
  823. <id>kdc</id>
  824. <phase>compile</phase>
  825. <goals>
  826. <goal>run</goal>
  827. </goals>
  828. <configuration>
  829. <target>
  830. <chmod file="${kdc.resource.dir}/killKdc.sh" perm="775" />
  831. <exec dir="${kdc.resource.dir}" executable= "./killKdc.sh" />
  832. <mkdir dir="${project.build.directory}/test-classes/kdc/downloads"/>
  833. <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"/>
  834. <untar src="${project.build.directory}/test-classes/kdc/downloads/apacheds-1.5.7.tar.gz" dest="${project.build.directory}/test-classes/kdc" compression="gzip" />
  835. <copy file="${kdc.resource.dir}/server.xml" toDir="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/conf"/>
  836. <mkdir dir="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/ldif"/>
  837. <copy toDir="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/ldif">
  838. <fileset dir="${kdc.resource.dir}/ldif"/>
  839. </copy>
  840. <chmod file="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/apacheds.sh" perm="775" />
  841. <exec dir="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/" executable="./apacheds.sh" spawn="true"/>
  842. </target>
  843. </configuration>
  844. </execution>
  845. <!-- On completion of graceful test phase: closes the ApacheDS KDC server -->
  846. <execution>
  847. <id>killKdc</id>
  848. <phase>test</phase>
  849. <goals>
  850. <goal>run</goal>
  851. </goals>
  852. <configuration>
  853. <target>
  854. <chmod file="${kdc.resource.dir}/killKdc.sh" perm="775" />
  855. <exec dir="${kdc.resource.dir}" executable= "./killKdc.sh" />
  856. </target>
  857. </configuration>
  858. </execution>
  859. </executions>
  860. </plugin>
  861. </plugins>
  862. </build>
  863. </profile>
  864. <profile>
  865. <id>parallel-tests</id>
  866. <build>
  867. <plugins>
  868. <plugin>
  869. <groupId>org.apache.maven.plugins</groupId>
  870. <artifactId>maven-surefire-plugin</artifactId>
  871. <configuration>
  872. <forkCount>${testsThreadCount}</forkCount>
  873. <argLine>-Xmx1024m -XX:+HeapDumpOnOutOfMemoryError -DminiClusterDedicatedDirs=true</argLine>
  874. </configuration>
  875. </plugin>
  876. </plugins>
  877. </build>
  878. </profile>
  879. <profile>
  880. <id>releasedocs</id>
  881. <activation>
  882. <activeByDefault>false</activeByDefault>
  883. </activation>
  884. <build>
  885. <plugins>
  886. <plugin>
  887. <groupId>org.codehaus.mojo</groupId>
  888. <artifactId>exec-maven-plugin</artifactId>
  889. <executions>
  890. <execution>
  891. <id>releasedocs</id>
  892. <phase>pre-site</phase>
  893. <goals>
  894. <goal>exec</goal>
  895. </goals>
  896. <configuration>
  897. <executable>python</executable>
  898. <workingDirectory>src/site/markdown/release/</workingDirectory>
  899. <requiresOnline>true</requiresOnline>
  900. <arguments>
  901. <argument>${basedir}/../../dev-support/releasedocmaker.py</argument>
  902. <argument>--version</argument>
  903. <argument>${project.version}</argument>
  904. <argument>--index</argument>
  905. <argument>--usetoday</argument>
  906. </arguments>
  907. </configuration>
  908. </execution>
  909. </executions>
  910. </plugin>
  911. <plugin>
  912. <artifactId>maven-clean-plugin</artifactId>
  913. <configuration>
  914. <filesets>
  915. <fileset>
  916. <directory>src/site/markdown/release</directory>
  917. <includes>
  918. <include>${project.version}/</include>
  919. <include>index.md</include>
  920. </includes>
  921. <followSymlinks>false</followSymlinks>
  922. </fileset>
  923. </filesets>
  924. </configuration>
  925. </plugin>
  926. </plugins>
  927. </build>
  928. </profile>
  929. <!-- profile to test shell code -->
  930. <profile>
  931. <id>shelltest</id>
  932. <activation>
  933. <activeByDefault>true</activeByDefault>
  934. </activation>
  935. <build>
  936. <plugins>
  937. <plugin>
  938. <artifactId>maven-antrun-plugin</artifactId>
  939. <executions>
  940. <execution>
  941. <id>common-test-bats-driver</id>
  942. <phase>process-test-classes</phase>
  943. <goals>
  944. <goal>run</goal>
  945. </goals>
  946. <configuration>
  947. <target>
  948. <exec dir="src/test/scripts"
  949. executable="bash"
  950. failonerror="true">
  951. <arg value="./run-bats.sh" />
  952. </exec>
  953. </target>
  954. </configuration>
  955. </execution>
  956. </executions>
  957. </plugin>
  958. </plugins>
  959. </build>
  960. </profile>
  961. </profiles>
  962. </project>