pom.xml 30 KB

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