pom.xml 26 KB

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