pom.xml 30 KB

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