pom.xml 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773
  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>2.6.0-SNAPSHOT</version>
  22. <relativePath>../../hadoop-project-dist</relativePath>
  23. </parent>
  24. <groupId>org.apache.hadoop</groupId>
  25. <artifactId>hadoop-common</artifactId>
  26. <version>2.6.0-SNAPSHOT</version>
  27. <description>Apache Hadoop Common</description>
  28. <name>Apache Hadoop Common</name>
  29. <packaging>jar</packaging>
  30. <properties>
  31. <hadoop.component>common</hadoop.component>
  32. <is.hadoop.component>true</is.hadoop.component>
  33. </properties>
  34. <dependencies>
  35. <dependency>
  36. <groupId>org.apache.hadoop</groupId>
  37. <artifactId>hadoop-annotations</artifactId>
  38. <scope>compile</scope>
  39. </dependency>
  40. <dependency>
  41. <groupId>com.google.guava</groupId>
  42. <artifactId>guava</artifactId>
  43. <scope>compile</scope>
  44. </dependency>
  45. <dependency>
  46. <groupId>commons-cli</groupId>
  47. <artifactId>commons-cli</artifactId>
  48. <scope>compile</scope>
  49. </dependency>
  50. <dependency>
  51. <groupId>org.apache.commons</groupId>
  52. <artifactId>commons-math3</artifactId>
  53. <scope>compile</scope>
  54. </dependency>
  55. <dependency>
  56. <groupId>xmlenc</groupId>
  57. <artifactId>xmlenc</artifactId>
  58. <scope>compile</scope>
  59. </dependency>
  60. <dependency>
  61. <groupId>commons-httpclient</groupId>
  62. <artifactId>commons-httpclient</artifactId>
  63. <scope>compile</scope>
  64. </dependency>
  65. <dependency>
  66. <groupId>commons-codec</groupId>
  67. <artifactId>commons-codec</artifactId>
  68. <scope>compile</scope>
  69. </dependency>
  70. <dependency>
  71. <groupId>commons-io</groupId>
  72. <artifactId>commons-io</artifactId>
  73. <scope>compile</scope>
  74. </dependency>
  75. <dependency>
  76. <groupId>commons-net</groupId>
  77. <artifactId>commons-net</artifactId>
  78. <scope>compile</scope>
  79. </dependency>
  80. <dependency>
  81. <groupId>commons-collections</groupId>
  82. <artifactId>commons-collections</artifactId>
  83. <scope>compile</scope>
  84. </dependency>
  85. <dependency>
  86. <groupId>javax.servlet</groupId>
  87. <artifactId>servlet-api</artifactId>
  88. <scope>compile</scope>
  89. </dependency>
  90. <dependency>
  91. <groupId>org.mortbay.jetty</groupId>
  92. <artifactId>jetty</artifactId>
  93. <scope>compile</scope>
  94. </dependency>
  95. <dependency>
  96. <groupId>org.mortbay.jetty</groupId>
  97. <artifactId>jetty-util</artifactId>
  98. <scope>compile</scope>
  99. </dependency>
  100. <dependency>
  101. <groupId>com.sun.jersey</groupId>
  102. <artifactId>jersey-core</artifactId>
  103. <scope>compile</scope>
  104. </dependency>
  105. <dependency>
  106. <!-- Used, even though 'mvn dependency:analyze' doesn't find it -->
  107. <groupId>com.sun.jersey</groupId>
  108. <artifactId>jersey-json</artifactId>
  109. <scope>compile</scope>
  110. </dependency>
  111. <dependency>
  112. <groupId>com.sun.jersey</groupId>
  113. <artifactId>jersey-server</artifactId>
  114. <scope>compile</scope>
  115. </dependency>
  116. <dependency>
  117. <groupId>tomcat</groupId>
  118. <artifactId>jasper-compiler</artifactId>
  119. <scope>runtime</scope>
  120. </dependency>
  121. <dependency>
  122. <groupId>tomcat</groupId>
  123. <artifactId>jasper-runtime</artifactId>
  124. <scope>runtime</scope>
  125. </dependency>
  126. <dependency>
  127. <groupId>javax.servlet.jsp</groupId>
  128. <artifactId>jsp-api</artifactId>
  129. <scope>runtime</scope>
  130. </dependency>
  131. <dependency>
  132. <groupId>commons-el</groupId>
  133. <artifactId>commons-el</artifactId>
  134. <scope>runtime</scope>
  135. </dependency>
  136. <dependency>
  137. <groupId>commons-logging</groupId>
  138. <artifactId>commons-logging</artifactId>
  139. <scope>compile</scope>
  140. </dependency>
  141. <dependency>
  142. <groupId>log4j</groupId>
  143. <artifactId>log4j</artifactId>
  144. <scope>compile</scope>
  145. </dependency>
  146. <dependency>
  147. <groupId>net.java.dev.jets3t</groupId>
  148. <artifactId>jets3t</artifactId>
  149. <scope>compile</scope>
  150. </dependency>
  151. <dependency>
  152. <groupId>junit</groupId>
  153. <artifactId>junit</artifactId>
  154. <scope>test</scope>
  155. </dependency>
  156. <dependency>
  157. <groupId>commons-lang</groupId>
  158. <artifactId>commons-lang</artifactId>
  159. <scope>compile</scope>
  160. </dependency>
  161. <dependency>
  162. <groupId>commons-configuration</groupId>
  163. <artifactId>commons-configuration</artifactId>
  164. <scope>compile</scope>
  165. </dependency>
  166. <dependency>
  167. <groupId>org.slf4j</groupId>
  168. <artifactId>slf4j-api</artifactId>
  169. <scope>compile</scope>
  170. </dependency>
  171. <dependency>
  172. <groupId>org.slf4j</groupId>
  173. <artifactId>slf4j-log4j12</artifactId>
  174. <scope>runtime</scope>
  175. </dependency>
  176. <dependency>
  177. <groupId>org.codehaus.jackson</groupId>
  178. <artifactId>jackson-core-asl</artifactId>
  179. <scope>compile</scope>
  180. </dependency>
  181. <dependency>
  182. <groupId>org.codehaus.jackson</groupId>
  183. <artifactId>jackson-mapper-asl</artifactId>
  184. <scope>compile</scope>
  185. </dependency>
  186. <dependency>
  187. <groupId>org.mockito</groupId>
  188. <artifactId>mockito-all</artifactId>
  189. <scope>test</scope>
  190. </dependency>
  191. <dependency>
  192. <groupId>org.apache.avro</groupId>
  193. <artifactId>avro</artifactId>
  194. <scope>compile</scope>
  195. </dependency>
  196. <dependency>
  197. <groupId>org.apache.ant</groupId>
  198. <artifactId>ant</artifactId>
  199. <scope>provided</scope>
  200. </dependency>
  201. <dependency>
  202. <groupId>com.google.protobuf</groupId>
  203. <artifactId>protobuf-java</artifactId>
  204. <scope>compile</scope>
  205. </dependency>
  206. <dependency>
  207. <groupId>com.google.code.gson</groupId>
  208. <artifactId>gson</artifactId>
  209. </dependency>
  210. <dependency>
  211. <groupId>org.apache.hadoop</groupId>
  212. <artifactId>hadoop-auth</artifactId>
  213. <scope>compile</scope>
  214. </dependency>
  215. <dependency>
  216. <groupId>org.apache.hadoop</groupId>
  217. <artifactId>hadoop-auth</artifactId>
  218. <type>test-jar</type>
  219. <scope>test</scope>
  220. </dependency>
  221. <dependency>
  222. <groupId>org.apache.hadoop</groupId>
  223. <artifactId>hadoop-minikdc</artifactId>
  224. <scope>test</scope>
  225. </dependency>
  226. <dependency>
  227. <groupId>com.jcraft</groupId>
  228. <artifactId>jsch</artifactId>
  229. </dependency>
  230. <dependency>
  231. <groupId>com.google.code.findbugs</groupId>
  232. <artifactId>jsr305</artifactId>
  233. <scope>compile</scope>
  234. </dependency>
  235. <dependency>
  236. <groupId>org.htrace</groupId>
  237. <artifactId>htrace-core</artifactId>
  238. </dependency>
  239. <dependency>
  240. <groupId>org.apache.zookeeper</groupId>
  241. <artifactId>zookeeper</artifactId>
  242. <exclusions>
  243. <exclusion>
  244. <groupId>jline</groupId>
  245. <artifactId>jline</artifactId>
  246. </exclusion>
  247. <exclusion>
  248. <groupId>org.jboss.netty</groupId>
  249. <artifactId>netty</artifactId>
  250. </exclusion>
  251. <exclusion>
  252. <!-- otherwise seems to drag in junit 3.8.1 via jline -->
  253. <groupId>junit</groupId>
  254. <artifactId>junit</artifactId>
  255. </exclusion>
  256. <exclusion>
  257. <groupId>com.sun.jdmk</groupId>
  258. <artifactId>jmxtools</artifactId>
  259. </exclusion>
  260. <exclusion>
  261. <groupId>com.sun.jmx</groupId>
  262. <artifactId>jmxri</artifactId>
  263. </exclusion>
  264. </exclusions>
  265. </dependency>
  266. <dependency>
  267. <groupId>org.apache.zookeeper</groupId>
  268. <artifactId>zookeeper</artifactId>
  269. <type>test-jar</type>
  270. <scope>test</scope>
  271. </dependency>
  272. <dependency>
  273. <groupId>org.apache.commons</groupId>
  274. <artifactId>commons-compress</artifactId>
  275. </dependency>
  276. </dependencies>
  277. <build>
  278. <!--
  279. Include all files in src/main/resources. By default, do not apply property
  280. substitution (filtering=false), but do apply property substitution to
  281. common-version-info.properties (filtering=true). This will substitute the
  282. version information correctly, but prevent Maven from altering other files
  283. like core-default.xml.
  284. -->
  285. <resources>
  286. <resource>
  287. <directory>${basedir}/src/main/resources</directory>
  288. <excludes>
  289. <exclude>common-version-info.properties</exclude>
  290. </excludes>
  291. <filtering>false</filtering>
  292. </resource>
  293. <resource>
  294. <directory>${basedir}/src/main/resources</directory>
  295. <includes>
  296. <include>common-version-info.properties</include>
  297. </includes>
  298. <filtering>true</filtering>
  299. </resource>
  300. </resources>
  301. <plugins>
  302. <plugin>
  303. <groupId>org.apache.hadoop</groupId>
  304. <artifactId>hadoop-maven-plugins</artifactId>
  305. <executions>
  306. <execution>
  307. <id>version-info</id>
  308. <phase>generate-resources</phase>
  309. <goals>
  310. <goal>version-info</goal>
  311. </goals>
  312. <configuration>
  313. <source>
  314. <directory>${basedir}/src/main</directory>
  315. <includes>
  316. <include>java/**/*.java</include>
  317. <include>proto/**/*.proto</include>
  318. </includes>
  319. </source>
  320. </configuration>
  321. </execution>
  322. <execution>
  323. <id>compile-protoc</id>
  324. <phase>generate-sources</phase>
  325. <goals>
  326. <goal>protoc</goal>
  327. </goals>
  328. <configuration>
  329. <protocVersion>${protobuf.version}</protocVersion>
  330. <protocCommand>${protoc.path}</protocCommand>
  331. <imports>
  332. <param>${basedir}/src/main/proto</param>
  333. </imports>
  334. <source>
  335. <directory>${basedir}/src/main/proto</directory>
  336. <includes>
  337. <include>HAServiceProtocol.proto</include>
  338. <include>IpcConnectionContext.proto</include>
  339. <include>ProtocolInfo.proto</include>
  340. <include>RpcHeader.proto</include>
  341. <include>ZKFCProtocol.proto</include>
  342. <include>ProtobufRpcEngine.proto</include>
  343. <include>Security.proto</include>
  344. <include>GetUserMappingsProtocol.proto</include>
  345. <include>RefreshAuthorizationPolicyProtocol.proto</include>
  346. <include>RefreshUserMappingsProtocol.proto</include>
  347. <include>RefreshCallQueueProtocol.proto</include>
  348. <include>GenericRefreshProtocol.proto</include>
  349. </includes>
  350. </source>
  351. <output>${project.build.directory}/generated-sources/java</output>
  352. </configuration>
  353. </execution>
  354. <execution>
  355. <id>compile-test-protoc</id>
  356. <phase>generate-test-sources</phase>
  357. <goals>
  358. <goal>protoc</goal>
  359. </goals>
  360. <configuration>
  361. <protocVersion>${protobuf.version}</protocVersion>
  362. <protocCommand>${protoc.path}</protocCommand>
  363. <imports>
  364. <param>${basedir}/src/test/proto</param>
  365. </imports>
  366. <source>
  367. <directory>${basedir}/src/test/proto</directory>
  368. <includes>
  369. <include>test.proto</include>
  370. <include>test_rpc_service.proto</include>
  371. </includes>
  372. </source>
  373. <output>${project.build.directory}/generated-test-sources/java</output>
  374. </configuration>
  375. </execution>
  376. </executions>
  377. </plugin>
  378. <plugin>
  379. <groupId>org.apache.maven.plugins</groupId>
  380. <artifactId>maven-surefire-plugin</artifactId>
  381. <configuration>
  382. <systemPropertyVariables>
  383. <startKdc>${startKdc}</startKdc>
  384. <kdc.resource.dir>${kdc.resource.dir}</kdc.resource.dir>
  385. <runningWithNative>${runningWithNative}</runningWithNative>
  386. </systemPropertyVariables>
  387. </configuration>
  388. </plugin>
  389. <plugin>
  390. <groupId>org.apache.avro</groupId>
  391. <artifactId>avro-maven-plugin</artifactId>
  392. <executions>
  393. <execution>
  394. <id>generate-avro-test-sources</id>
  395. <phase>generate-test-sources</phase>
  396. <goals>
  397. <goal>schema</goal>
  398. </goals>
  399. </execution>
  400. </executions>
  401. <configuration>
  402. <testOutputDirectory>${project.build.directory}/generated-test-sources/java</testOutputDirectory>
  403. </configuration>
  404. </plugin>
  405. <plugin>
  406. <groupId>org.apache.maven.plugins</groupId>
  407. <artifactId>maven-antrun-plugin</artifactId>
  408. <executions>
  409. <execution>
  410. <id>create-log-dir</id>
  411. <phase>process-test-resources</phase>
  412. <goals>
  413. <goal>run</goal>
  414. </goals>
  415. <configuration>
  416. <target>
  417. <!--
  418. TODO: there are tests (TestLocalFileSystem#testCopy) that fail if data
  419. TODO: from a previous run is present
  420. -->
  421. <delete dir="${test.build.data}"/>
  422. <mkdir dir="${test.build.data}"/>
  423. <mkdir dir="${hadoop.log.dir}"/>
  424. <copy toDir="${project.build.directory}/test-classes">
  425. <fileset dir="${basedir}/src/main/conf"/>
  426. </copy>
  427. </target>
  428. </configuration>
  429. </execution>
  430. <execution>
  431. <id>copy-test-tarballs</id>
  432. <phase>process-test-resources</phase>
  433. <goals>
  434. <goal>run</goal>
  435. </goals>
  436. <configuration>
  437. <target>
  438. <copy toDir="${test.cache.data}">
  439. <fileset dir="${basedir}/src/test/java/org/apache/hadoop/fs">
  440. <include name="test-untar.tar"/>
  441. <include name="test-untar.tgz"/>
  442. </fileset>
  443. </copy>
  444. </target>
  445. </configuration>
  446. </execution>
  447. <execution>
  448. <phase>pre-site</phase>
  449. <goals>
  450. <goal>run</goal>
  451. </goals>
  452. <configuration>
  453. <tasks>
  454. <copy file="src/main/resources/core-default.xml" todir="src/site/resources"/>
  455. <copy file="src/main/xsl/configuration.xsl" todir="src/site/resources"/>
  456. </tasks>
  457. </configuration>
  458. </execution>
  459. </executions>
  460. </plugin>
  461. <plugin>
  462. <groupId>org.apache.rat</groupId>
  463. <artifactId>apache-rat-plugin</artifactId>
  464. <configuration>
  465. <excludes>
  466. <exclude>CHANGES.txt</exclude>
  467. <exclude>.idea/**</exclude>
  468. <exclude>src/main/conf/*</exclude>
  469. <exclude>src/main/docs/**</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/lz4_encoder.h</exclude>
  480. <exclude>src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4hc.h</exclude>
  481. <exclude>src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4hc.c</exclude>
  482. <exclude>src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4hc_encoder.h</exclude>
  483. <exclude>src/test/java/org/apache/hadoop/fs/test-untar.tgz</exclude>
  484. <exclude>src/test/resources/test.har/_SUCCESS</exclude>
  485. <exclude>src/test/resources/test.har/_index</exclude>
  486. <exclude>src/test/resources/test.har/_masterindex</exclude>
  487. <exclude>src/test/resources/test.har/part-0</exclude>
  488. <exclude>src/test/resources/javakeystoreprovider.password</exclude>
  489. </excludes>
  490. </configuration>
  491. </plugin>
  492. <plugin>
  493. <groupId>org.apache.maven.plugins</groupId>
  494. <artifactId>maven-surefire-plugin</artifactId>
  495. <configuration>
  496. <properties>
  497. <property>
  498. <name>listener</name>
  499. <value>org.apache.hadoop.test.TimedOutTestsListener</value>
  500. </property>
  501. </properties>
  502. </configuration>
  503. </plugin>
  504. </plugins>
  505. </build>
  506. <profiles>
  507. <profile>
  508. <id>native</id>
  509. <activation>
  510. <activeByDefault>false</activeByDefault>
  511. </activation>
  512. <properties>
  513. <require.bzip2>false</require.bzip2>
  514. <snappy.prefix></snappy.prefix>
  515. <snappy.lib></snappy.lib>
  516. <snappy.include></snappy.include>
  517. <require.snappy>false</require.snappy>
  518. <openssl.prefix></openssl.prefix>
  519. <openssl.lib></openssl.lib>
  520. <openssl.include></openssl.include>
  521. <require.openssl>false</require.openssl>
  522. <runningWithNative>true</runningWithNative>
  523. </properties>
  524. <build>
  525. <plugins>
  526. <plugin>
  527. <groupId>org.apache.maven.plugins</groupId>
  528. <artifactId>maven-enforcer-plugin</artifactId>
  529. <executions>
  530. <execution>
  531. <id>enforce-os</id>
  532. <goals>
  533. <goal>enforce</goal>
  534. </goals>
  535. <configuration>
  536. <rules>
  537. <requireOS>
  538. <family>mac</family>
  539. <family>unix</family>
  540. <message>native build only supported on Mac or Unix</message>
  541. </requireOS>
  542. </rules>
  543. <fail>true</fail>
  544. </configuration>
  545. </execution>
  546. </executions>
  547. </plugin>
  548. <plugin>
  549. <groupId>org.codehaus.mojo</groupId>
  550. <artifactId>native-maven-plugin</artifactId>
  551. <executions>
  552. <execution>
  553. <phase>compile</phase>
  554. <goals>
  555. <goal>javah</goal>
  556. </goals>
  557. <configuration>
  558. <javahPath>${env.JAVA_HOME}/bin/javah</javahPath>
  559. <javahClassNames>
  560. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibCompressor</javahClassName>
  561. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibDecompressor</javahClassName>
  562. <javahClassName>org.apache.hadoop.io.compress.bzip2.Bzip2Compressor</javahClassName>
  563. <javahClassName>org.apache.hadoop.io.compress.bzip2.Bzip2Decompressor</javahClassName>
  564. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsMapping</javahClassName>
  565. <javahClassName>org.apache.hadoop.io.nativeio.NativeIO</javahClassName>
  566. <javahClassName>org.apache.hadoop.io.nativeio.SharedFileDescriptorFactory</javahClassName>
  567. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsNetgroupMapping</javahClassName>
  568. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyCompressor</javahClassName>
  569. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyDecompressor</javahClassName>
  570. <javahClassName>org.apache.hadoop.io.compress.lz4.Lz4Compressor</javahClassName>
  571. <javahClassName>org.apache.hadoop.io.compress.lz4.Lz4Decompressor</javahClassName>
  572. <javahClassName>org.apache.hadoop.crypto.OpensslCipher</javahClassName>
  573. <javahClassName>org.apache.hadoop.crypto.random.OpensslSecureRandom</javahClassName>
  574. <javahClassName>org.apache.hadoop.util.NativeCrc32</javahClassName>
  575. <javahClassName>org.apache.hadoop.net.unix.DomainSocket</javahClassName>
  576. <javahClassName>org.apache.hadoop.net.unix.DomainSocketWatcher</javahClassName>
  577. </javahClassNames>
  578. <javahOutputDirectory>${project.build.directory}/native/javah</javahOutputDirectory>
  579. </configuration>
  580. </execution>
  581. </executions>
  582. </plugin>
  583. <plugin>
  584. <groupId>org.apache.maven.plugins</groupId>
  585. <artifactId>maven-antrun-plugin</artifactId>
  586. <executions>
  587. <execution>
  588. <id>make</id>
  589. <phase>compile</phase>
  590. <goals><goal>run</goal></goals>
  591. <configuration>
  592. <target>
  593. <exec executable="cmake" dir="${project.build.directory}/native" failonerror="true">
  594. <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}"/>
  595. </exec>
  596. <exec executable="make" dir="${project.build.directory}/native" failonerror="true">
  597. <arg line="VERBOSE=1"/>
  598. </exec>
  599. <!-- The second make is a workaround for HADOOP-9215. It can
  600. be removed when version 2.6 of cmake is no longer supported . -->
  601. <exec executable="make" dir="${project.build.directory}/native" failonerror="true"></exec>
  602. </target>
  603. </configuration>
  604. </execution>
  605. <execution>
  606. <id>native_tests</id>
  607. <phase>test</phase>
  608. <goals><goal>run</goal></goals>
  609. <configuration>
  610. <target>
  611. <exec executable="sh" failonerror="true" dir="${project.build.directory}/native">
  612. <arg value="-c"/>
  613. <arg value="[ x$SKIPTESTS = xtrue ] || ${project.build.directory}/native/test_bulk_crc32"/>
  614. <env key="SKIPTESTS" value="${skipTests}"/>
  615. </exec>
  616. </target>
  617. </configuration>
  618. </execution>
  619. </executions>
  620. </plugin>
  621. </plugins>
  622. </build>
  623. </profile>
  624. <profile>
  625. <id>native-win</id>
  626. <activation>
  627. <os>
  628. <family>Windows</family>
  629. </os>
  630. </activation>
  631. <properties>
  632. <snappy.prefix></snappy.prefix>
  633. <snappy.lib></snappy.lib>
  634. <snappy.include></snappy.include>
  635. <require.snappy>false</require.snappy>
  636. <bundle.snappy.in.bin>true</bundle.snappy.in.bin>
  637. <openssl.prefix></openssl.prefix>
  638. <openssl.lib></openssl.lib>
  639. <openssl.include></openssl.include>
  640. <require.openssl>false</require.openssl>
  641. <runningWithNative>true</runningWithNative>
  642. <bundle.openssl.in.bin>true</bundle.openssl.in.bin>
  643. </properties>
  644. <build>
  645. <plugins>
  646. <plugin>
  647. <groupId>org.apache.maven.plugins</groupId>
  648. <artifactId>maven-enforcer-plugin</artifactId>
  649. <executions>
  650. <execution>
  651. <id>enforce-os</id>
  652. <goals>
  653. <goal>enforce</goal>
  654. </goals>
  655. <configuration>
  656. <rules>
  657. <requireOS>
  658. <family>windows</family>
  659. <message>native-win build only supported on Windows</message>
  660. </requireOS>
  661. </rules>
  662. <fail>true</fail>
  663. </configuration>
  664. </execution>
  665. </executions>
  666. </plugin>
  667. <plugin>
  668. <groupId>org.codehaus.mojo</groupId>
  669. <artifactId>native-maven-plugin</artifactId>
  670. <executions>
  671. <execution>
  672. <phase>compile</phase>
  673. <goals>
  674. <goal>javah</goal>
  675. </goals>
  676. <configuration>
  677. <javahPath>${env.JAVA_HOME}/bin/javah</javahPath>
  678. <javahClassNames>
  679. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibCompressor</javahClassName>
  680. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibDecompressor</javahClassName>
  681. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsMapping</javahClassName>
  682. <javahClassName>org.apache.hadoop.io.nativeio.NativeIO</javahClassName>
  683. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsNetgroupMapping</javahClassName>
  684. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyCompressor</javahClassName>
  685. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyDecompressor</javahClassName>
  686. <javahClassName>org.apache.hadoop.io.compress.lz4.Lz4Compressor</javahClassName>
  687. <javahClassName>org.apache.hadoop.io.compress.lz4.Lz4Decompressor</javahClassName>
  688. <javahClassName>org.apache.hadoop.crypto.OpensslCipher</javahClassName>
  689. <javahClassName>org.apache.hadoop.crypto.random.OpensslSecureRandom</javahClassName>
  690. <javahClassName>org.apache.hadoop.util.NativeCrc32</javahClassName>
  691. </javahClassNames>
  692. <javahOutputDirectory>${project.build.directory}/native/javah</javahOutputDirectory>
  693. </configuration>
  694. </execution>
  695. </executions>
  696. </plugin>
  697. <plugin>
  698. <groupId>org.codehaus.mojo</groupId>
  699. <artifactId>exec-maven-plugin</artifactId>
  700. <executions>
  701. <execution>
  702. <id>compile-ms-winutils</id>
  703. <phase>compile</phase>
  704. <goals>
  705. <goal>exec</goal>
  706. </goals>
  707. <configuration>
  708. <executable>msbuild</executable>
  709. <arguments>
  710. <argument>${basedir}/src/main/winutils/winutils.sln</argument>
  711. <argument>/nologo</argument>
  712. <argument>/p:Configuration=Release</argument>
  713. <argument>/p:OutDir=${project.build.directory}/bin/</argument>
  714. </arguments>
  715. </configuration>
  716. </execution>
  717. <execution>
  718. <id>compile-ms-native-dll</id>
  719. <phase>compile</phase>
  720. <goals>
  721. <goal>exec</goal>
  722. </goals>
  723. <configuration>
  724. <executable>msbuild</executable>
  725. <arguments>
  726. <argument>${basedir}/src/main/native/native.sln</argument>
  727. <argument>/nologo</argument>
  728. <argument>/p:Configuration=Release</argument>
  729. <argument>/p:OutDir=${project.build.directory}/bin/</argument>
  730. <argument>/p:CustomSnappyPrefix=${snappy.prefix}</argument>
  731. <argument>/p:CustomSnappyLib=${snappy.lib}</argument>
  732. <argument>/p:CustomSnappyInclude=${snappy.include}</argument>
  733. <argument>/p:RequireSnappy=${require.snappy}</argument>
  734. <argument>/p:CustomOpensslPrefix=${openssl.prefix}</argument>
  735. <argument>/p:CustomOpensslLib=${openssl.lib}</argument>
  736. <argument>/p:CustomOpensslInclude=${openssl.include}</argument>
  737. <argument>/p:RequireOpenssl=${require.openssl}</argument>
  738. </arguments>
  739. </configuration>
  740. </execution>
  741. </executions>
  742. </plugin>
  743. </plugins>
  744. </build>
  745. </profile>
  746. <profile>
  747. <id>parallel-tests</id>
  748. <build>
  749. <plugins>
  750. <plugin>
  751. <groupId>org.apache.maven.plugins</groupId>
  752. <artifactId>maven-surefire-plugin</artifactId>
  753. <configuration>
  754. <forkCount>${testsThreadCount}</forkCount>
  755. <argLine>-Xmx1024m -XX:+HeapDumpOnOutOfMemoryError -DminiClusterDedicatedDirs=true</argLine>
  756. </configuration>
  757. </plugin>
  758. </plugins>
  759. </build>
  760. </profile>
  761. </profiles>
  762. </project>