pom.xml 28 KB

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