pom.xml 34 KB

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