pom.xml 27 KB

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