pom.xml 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748
  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.apache.zookeeper</groupId>
  237. <artifactId>zookeeper</artifactId>
  238. <exclusions>
  239. <exclusion>
  240. <groupId>jline</groupId>
  241. <artifactId>jline</artifactId>
  242. </exclusion>
  243. <exclusion>
  244. <groupId>org.jboss.netty</groupId>
  245. <artifactId>netty</artifactId>
  246. </exclusion>
  247. <exclusion>
  248. <!-- otherwise seems to drag in junit 3.8.1 via jline -->
  249. <groupId>junit</groupId>
  250. <artifactId>junit</artifactId>
  251. </exclusion>
  252. <exclusion>
  253. <groupId>com.sun.jdmk</groupId>
  254. <artifactId>jmxtools</artifactId>
  255. </exclusion>
  256. <exclusion>
  257. <groupId>com.sun.jmx</groupId>
  258. <artifactId>jmxri</artifactId>
  259. </exclusion>
  260. </exclusions>
  261. </dependency>
  262. <dependency>
  263. <groupId>org.apache.zookeeper</groupId>
  264. <artifactId>zookeeper</artifactId>
  265. <type>test-jar</type>
  266. <scope>test</scope>
  267. </dependency>
  268. <dependency>
  269. <groupId>org.apache.commons</groupId>
  270. <artifactId>commons-compress</artifactId>
  271. </dependency>
  272. </dependencies>
  273. <build>
  274. <!--
  275. Include all files in src/main/resources. By default, do not apply property
  276. substitution (filtering=false), but do apply property substitution to
  277. common-version-info.properties (filtering=true). This will substitute the
  278. version information correctly, but prevent Maven from altering other files
  279. like core-default.xml.
  280. -->
  281. <resources>
  282. <resource>
  283. <directory>${basedir}/src/main/resources</directory>
  284. <excludes>
  285. <exclude>common-version-info.properties</exclude>
  286. </excludes>
  287. <filtering>false</filtering>
  288. </resource>
  289. <resource>
  290. <directory>${basedir}/src/main/resources</directory>
  291. <includes>
  292. <include>common-version-info.properties</include>
  293. </includes>
  294. <filtering>true</filtering>
  295. </resource>
  296. </resources>
  297. <plugins>
  298. <plugin>
  299. <groupId>org.apache.hadoop</groupId>
  300. <artifactId>hadoop-maven-plugins</artifactId>
  301. <executions>
  302. <execution>
  303. <id>version-info</id>
  304. <phase>generate-resources</phase>
  305. <goals>
  306. <goal>version-info</goal>
  307. </goals>
  308. <configuration>
  309. <source>
  310. <directory>${basedir}/src/main</directory>
  311. <includes>
  312. <include>java/**/*.java</include>
  313. <include>proto/**/*.proto</include>
  314. </includes>
  315. </source>
  316. </configuration>
  317. </execution>
  318. <execution>
  319. <id>compile-protoc</id>
  320. <phase>generate-sources</phase>
  321. <goals>
  322. <goal>protoc</goal>
  323. </goals>
  324. <configuration>
  325. <protocVersion>${protobuf.version}</protocVersion>
  326. <protocCommand>${protoc.path}</protocCommand>
  327. <imports>
  328. <param>${basedir}/src/main/proto</param>
  329. </imports>
  330. <source>
  331. <directory>${basedir}/src/main/proto</directory>
  332. <includes>
  333. <include>HAServiceProtocol.proto</include>
  334. <include>IpcConnectionContext.proto</include>
  335. <include>ProtocolInfo.proto</include>
  336. <include>RpcHeader.proto</include>
  337. <include>ZKFCProtocol.proto</include>
  338. <include>ProtobufRpcEngine.proto</include>
  339. <include>Security.proto</include>
  340. <include>GetUserMappingsProtocol.proto</include>
  341. <include>RefreshAuthorizationPolicyProtocol.proto</include>
  342. <include>RefreshUserMappingsProtocol.proto</include>
  343. <include>RefreshCallQueueProtocol.proto</include>
  344. <include>GenericRefreshProtocol.proto</include>
  345. </includes>
  346. </source>
  347. <output>${project.build.directory}/generated-sources/java</output>
  348. </configuration>
  349. </execution>
  350. <execution>
  351. <id>compile-test-protoc</id>
  352. <phase>generate-test-sources</phase>
  353. <goals>
  354. <goal>protoc</goal>
  355. </goals>
  356. <configuration>
  357. <protocVersion>${protobuf.version}</protocVersion>
  358. <protocCommand>${protoc.path}</protocCommand>
  359. <imports>
  360. <param>${basedir}/src/test/proto</param>
  361. </imports>
  362. <source>
  363. <directory>${basedir}/src/test/proto</directory>
  364. <includes>
  365. <include>test.proto</include>
  366. <include>test_rpc_service.proto</include>
  367. </includes>
  368. </source>
  369. <output>${project.build.directory}/generated-test-sources/java</output>
  370. </configuration>
  371. </execution>
  372. </executions>
  373. </plugin>
  374. <plugin>
  375. <groupId>org.apache.maven.plugins</groupId>
  376. <artifactId>maven-surefire-plugin</artifactId>
  377. <configuration>
  378. <systemPropertyVariables>
  379. <startKdc>${startKdc}</startKdc>
  380. <kdc.resource.dir>${kdc.resource.dir}</kdc.resource.dir>
  381. </systemPropertyVariables>
  382. </configuration>
  383. </plugin>
  384. <plugin>
  385. <groupId>org.apache.avro</groupId>
  386. <artifactId>avro-maven-plugin</artifactId>
  387. <executions>
  388. <execution>
  389. <id>generate-avro-test-sources</id>
  390. <phase>generate-test-sources</phase>
  391. <goals>
  392. <goal>schema</goal>
  393. </goals>
  394. </execution>
  395. </executions>
  396. <configuration>
  397. <testOutputDirectory>${project.build.directory}/generated-test-sources/java</testOutputDirectory>
  398. </configuration>
  399. </plugin>
  400. <plugin>
  401. <groupId>org.apache.maven.plugins</groupId>
  402. <artifactId>maven-antrun-plugin</artifactId>
  403. <executions>
  404. <execution>
  405. <id>create-log-dir</id>
  406. <phase>process-test-resources</phase>
  407. <goals>
  408. <goal>run</goal>
  409. </goals>
  410. <configuration>
  411. <target>
  412. <!--
  413. TODO: there are tests (TestLocalFileSystem#testCopy) that fail if data
  414. TODO: from a previous run is present
  415. -->
  416. <delete dir="${test.build.data}"/>
  417. <mkdir dir="${test.build.data}"/>
  418. <mkdir dir="${hadoop.log.dir}"/>
  419. <copy toDir="${project.build.directory}/test-classes">
  420. <fileset dir="${basedir}/src/main/conf"/>
  421. </copy>
  422. </target>
  423. </configuration>
  424. </execution>
  425. <execution>
  426. <id>copy-test-tarballs</id>
  427. <phase>process-test-resources</phase>
  428. <goals>
  429. <goal>run</goal>
  430. </goals>
  431. <configuration>
  432. <target>
  433. <copy toDir="${test.cache.data}">
  434. <fileset dir="${basedir}/src/test/java/org/apache/hadoop/fs">
  435. <include name="test-untar.tar"/>
  436. <include name="test-untar.tgz"/>
  437. </fileset>
  438. </copy>
  439. </target>
  440. </configuration>
  441. </execution>
  442. <execution>
  443. <phase>pre-site</phase>
  444. <goals>
  445. <goal>run</goal>
  446. </goals>
  447. <configuration>
  448. <tasks>
  449. <copy file="src/main/resources/core-default.xml" todir="src/site/resources"/>
  450. <copy file="src/main/xsl/configuration.xsl" todir="src/site/resources"/>
  451. </tasks>
  452. </configuration>
  453. </execution>
  454. </executions>
  455. </plugin>
  456. <plugin>
  457. <groupId>org.apache.rat</groupId>
  458. <artifactId>apache-rat-plugin</artifactId>
  459. <configuration>
  460. <excludes>
  461. <exclude>CHANGES.txt</exclude>
  462. <exclude>.idea/**</exclude>
  463. <exclude>src/main/conf/*</exclude>
  464. <exclude>src/main/docs/**</exclude>
  465. <exclude>dev-support/jdiff/**</exclude>
  466. <exclude>src/main/native/*</exclude>
  467. <exclude>src/main/native/config/*</exclude>
  468. <exclude>src/main/native/m4/*</exclude>
  469. <exclude>src/test/empty-file</exclude>
  470. <exclude>src/test/all-tests</exclude>
  471. <exclude>src/test/resources/kdc/ldif/users.ldif</exclude>
  472. <exclude>src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4.h</exclude>
  473. <exclude>src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4.c</exclude>
  474. <exclude>src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4_encoder.h</exclude>
  475. <exclude>src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4hc.h</exclude>
  476. <exclude>src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4hc.c</exclude>
  477. <exclude>src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4hc_encoder.h</exclude>
  478. <exclude>src/test/java/org/apache/hadoop/fs/test-untar.tgz</exclude>
  479. <exclude>src/test/resources/test.har/_SUCCESS</exclude>
  480. <exclude>src/test/resources/test.har/_index</exclude>
  481. <exclude>src/test/resources/test.har/_masterindex</exclude>
  482. <exclude>src/test/resources/test.har/part-0</exclude>
  483. </excludes>
  484. </configuration>
  485. </plugin>
  486. <plugin>
  487. <groupId>org.apache.maven.plugins</groupId>
  488. <artifactId>maven-surefire-plugin</artifactId>
  489. <configuration>
  490. <properties>
  491. <property>
  492. <name>listener</name>
  493. <value>org.apache.hadoop.test.TimedOutTestsListener</value>
  494. </property>
  495. </properties>
  496. </configuration>
  497. </plugin>
  498. </plugins>
  499. </build>
  500. <profiles>
  501. <profile>
  502. <id>native</id>
  503. <activation>
  504. <activeByDefault>false</activeByDefault>
  505. </activation>
  506. <properties>
  507. <require.bzip2>false</require.bzip2>
  508. <snappy.prefix></snappy.prefix>
  509. <snappy.lib></snappy.lib>
  510. <snappy.include></snappy.include>
  511. <require.snappy>false</require.snappy>
  512. </properties>
  513. <build>
  514. <plugins>
  515. <plugin>
  516. <groupId>org.apache.maven.plugins</groupId>
  517. <artifactId>maven-enforcer-plugin</artifactId>
  518. <executions>
  519. <execution>
  520. <id>enforce-os</id>
  521. <goals>
  522. <goal>enforce</goal>
  523. </goals>
  524. <configuration>
  525. <rules>
  526. <requireOS>
  527. <family>mac</family>
  528. <family>unix</family>
  529. <message>native build only supported on Mac or Unix</message>
  530. </requireOS>
  531. </rules>
  532. <fail>true</fail>
  533. </configuration>
  534. </execution>
  535. </executions>
  536. </plugin>
  537. <plugin>
  538. <groupId>org.codehaus.mojo</groupId>
  539. <artifactId>native-maven-plugin</artifactId>
  540. <executions>
  541. <execution>
  542. <phase>compile</phase>
  543. <goals>
  544. <goal>javah</goal>
  545. </goals>
  546. <configuration>
  547. <javahPath>${env.JAVA_HOME}/bin/javah</javahPath>
  548. <javahClassNames>
  549. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibCompressor</javahClassName>
  550. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibDecompressor</javahClassName>
  551. <javahClassName>org.apache.hadoop.io.compress.bzip2.Bzip2Compressor</javahClassName>
  552. <javahClassName>org.apache.hadoop.io.compress.bzip2.Bzip2Decompressor</javahClassName>
  553. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsMapping</javahClassName>
  554. <javahClassName>org.apache.hadoop.io.nativeio.NativeIO</javahClassName>
  555. <javahClassName>org.apache.hadoop.io.nativeio.SharedFileDescriptorFactory</javahClassName>
  556. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsNetgroupMapping</javahClassName>
  557. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyCompressor</javahClassName>
  558. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyDecompressor</javahClassName>
  559. <javahClassName>org.apache.hadoop.io.compress.lz4.Lz4Compressor</javahClassName>
  560. <javahClassName>org.apache.hadoop.io.compress.lz4.Lz4Decompressor</javahClassName>
  561. <javahClassName>org.apache.hadoop.util.NativeCrc32</javahClassName>
  562. <javahClassName>org.apache.hadoop.net.unix.DomainSocket</javahClassName>
  563. <javahClassName>org.apache.hadoop.net.unix.DomainSocketWatcher</javahClassName>
  564. </javahClassNames>
  565. <javahOutputDirectory>${project.build.directory}/native/javah</javahOutputDirectory>
  566. </configuration>
  567. </execution>
  568. </executions>
  569. </plugin>
  570. <plugin>
  571. <groupId>org.apache.maven.plugins</groupId>
  572. <artifactId>maven-antrun-plugin</artifactId>
  573. <executions>
  574. <execution>
  575. <id>make</id>
  576. <phase>compile</phase>
  577. <goals><goal>run</goal></goals>
  578. <configuration>
  579. <target>
  580. <exec executable="cmake" dir="${project.build.directory}/native" failonerror="true">
  581. <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}"/>
  582. </exec>
  583. <exec executable="make" dir="${project.build.directory}/native" failonerror="true">
  584. <arg line="VERBOSE=1"/>
  585. </exec>
  586. <!-- The second make is a workaround for HADOOP-9215. It can
  587. be removed when version 2.6 of cmake is no longer supported . -->
  588. <exec executable="make" dir="${project.build.directory}/native" failonerror="true"></exec>
  589. </target>
  590. </configuration>
  591. </execution>
  592. <execution>
  593. <id>native_tests</id>
  594. <phase>test</phase>
  595. <goals><goal>run</goal></goals>
  596. <configuration>
  597. <target>
  598. <exec executable="sh" failonerror="true" dir="${project.build.directory}/native">
  599. <arg value="-c"/>
  600. <arg value="[ x$SKIPTESTS = xtrue ] || ${project.build.directory}/native/test_bulk_crc32"/>
  601. <env key="SKIPTESTS" value="${skipTests}"/>
  602. </exec>
  603. </target>
  604. </configuration>
  605. </execution>
  606. </executions>
  607. </plugin>
  608. </plugins>
  609. </build>
  610. </profile>
  611. <profile>
  612. <id>native-win</id>
  613. <activation>
  614. <os>
  615. <family>Windows</family>
  616. </os>
  617. </activation>
  618. <properties>
  619. <snappy.prefix></snappy.prefix>
  620. <snappy.lib></snappy.lib>
  621. <snappy.include></snappy.include>
  622. <require.snappy>false</require.snappy>
  623. <bundle.snappy.in.bin>true</bundle.snappy.in.bin>
  624. </properties>
  625. <build>
  626. <plugins>
  627. <plugin>
  628. <groupId>org.apache.maven.plugins</groupId>
  629. <artifactId>maven-enforcer-plugin</artifactId>
  630. <executions>
  631. <execution>
  632. <id>enforce-os</id>
  633. <goals>
  634. <goal>enforce</goal>
  635. </goals>
  636. <configuration>
  637. <rules>
  638. <requireOS>
  639. <family>windows</family>
  640. <message>native-win build only supported on Windows</message>
  641. </requireOS>
  642. </rules>
  643. <fail>true</fail>
  644. </configuration>
  645. </execution>
  646. </executions>
  647. </plugin>
  648. <plugin>
  649. <groupId>org.codehaus.mojo</groupId>
  650. <artifactId>native-maven-plugin</artifactId>
  651. <executions>
  652. <execution>
  653. <phase>compile</phase>
  654. <goals>
  655. <goal>javah</goal>
  656. </goals>
  657. <configuration>
  658. <javahPath>${env.JAVA_HOME}/bin/javah</javahPath>
  659. <javahClassNames>
  660. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibCompressor</javahClassName>
  661. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibDecompressor</javahClassName>
  662. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsMapping</javahClassName>
  663. <javahClassName>org.apache.hadoop.io.nativeio.NativeIO</javahClassName>
  664. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsNetgroupMapping</javahClassName>
  665. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyCompressor</javahClassName>
  666. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyDecompressor</javahClassName>
  667. <javahClassName>org.apache.hadoop.io.compress.lz4.Lz4Compressor</javahClassName>
  668. <javahClassName>org.apache.hadoop.io.compress.lz4.Lz4Decompressor</javahClassName>
  669. <javahClassName>org.apache.hadoop.util.NativeCrc32</javahClassName>
  670. </javahClassNames>
  671. <javahOutputDirectory>${project.build.directory}/native/javah</javahOutputDirectory>
  672. </configuration>
  673. </execution>
  674. </executions>
  675. </plugin>
  676. <plugin>
  677. <groupId>org.codehaus.mojo</groupId>
  678. <artifactId>exec-maven-plugin</artifactId>
  679. <executions>
  680. <execution>
  681. <id>compile-ms-winutils</id>
  682. <phase>compile</phase>
  683. <goals>
  684. <goal>exec</goal>
  685. </goals>
  686. <configuration>
  687. <executable>msbuild</executable>
  688. <arguments>
  689. <argument>${basedir}/src/main/winutils/winutils.sln</argument>
  690. <argument>/nologo</argument>
  691. <argument>/p:Configuration=Release</argument>
  692. <argument>/p:OutDir=${project.build.directory}/bin/</argument>
  693. </arguments>
  694. </configuration>
  695. </execution>
  696. <execution>
  697. <id>compile-ms-native-dll</id>
  698. <phase>compile</phase>
  699. <goals>
  700. <goal>exec</goal>
  701. </goals>
  702. <configuration>
  703. <executable>msbuild</executable>
  704. <arguments>
  705. <argument>${basedir}/src/main/native/native.sln</argument>
  706. <argument>/nologo</argument>
  707. <argument>/p:Configuration=Release</argument>
  708. <argument>/p:OutDir=${project.build.directory}/bin/</argument>
  709. <argument>/p:CustomSnappyPrefix=${snappy.prefix}</argument>
  710. <argument>/p:CustomSnappyLib=${snappy.lib}</argument>
  711. <argument>/p:CustomSnappyInclude=${snappy.include}</argument>
  712. <argument>/p:RequireSnappy=${require.snappy}</argument>
  713. </arguments>
  714. </configuration>
  715. </execution>
  716. </executions>
  717. </plugin>
  718. </plugins>
  719. </build>
  720. </profile>
  721. <profile>
  722. <id>parallel-tests</id>
  723. <build>
  724. <plugins>
  725. <plugin>
  726. <groupId>org.apache.maven.plugins</groupId>
  727. <artifactId>maven-surefire-plugin</artifactId>
  728. <configuration>
  729. <forkCount>${testsThreadCount}</forkCount>
  730. <argLine>-Xmx1024m -XX:+HeapDumpOnOutOfMemoryError -DminiClusterDedicatedDirs=true</argLine>
  731. </configuration>
  732. </plugin>
  733. </plugins>
  734. </build>
  735. </profile>
  736. </profiles>
  737. </project>