pom.xml 30 KB

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