pom.xml 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868
  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.9.0-SNAPSHOT</version>
  22. <relativePath>../../hadoop-project-dist</relativePath>
  23. </parent>
  24. <groupId>org.apache.hadoop</groupId>
  25. <artifactId>hadoop-common</artifactId>
  26. <version>2.9.0-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>org.apache.httpcomponents</groupId>
  64. <artifactId>httpclient</artifactId>
  65. <scope>compile</scope>
  66. </dependency>
  67. <dependency>
  68. <groupId>commons-codec</groupId>
  69. <artifactId>commons-codec</artifactId>
  70. <scope>compile</scope>
  71. </dependency>
  72. <dependency>
  73. <groupId>commons-io</groupId>
  74. <artifactId>commons-io</artifactId>
  75. <scope>compile</scope>
  76. </dependency>
  77. <dependency>
  78. <groupId>commons-net</groupId>
  79. <artifactId>commons-net</artifactId>
  80. <scope>compile</scope>
  81. </dependency>
  82. <dependency>
  83. <groupId>commons-collections</groupId>
  84. <artifactId>commons-collections</artifactId>
  85. <scope>compile</scope>
  86. </dependency>
  87. <dependency>
  88. <groupId>javax.servlet</groupId>
  89. <artifactId>servlet-api</artifactId>
  90. <scope>compile</scope>
  91. </dependency>
  92. <dependency>
  93. <groupId>org.mortbay.jetty</groupId>
  94. <artifactId>jetty</artifactId>
  95. <scope>compile</scope>
  96. </dependency>
  97. <dependency>
  98. <groupId>org.mortbay.jetty</groupId>
  99. <artifactId>jetty-util</artifactId>
  100. <scope>compile</scope>
  101. </dependency>
  102. <dependency>
  103. <groupId>javax.servlet.jsp</groupId>
  104. <artifactId>jsp-api</artifactId>
  105. <scope>runtime</scope>
  106. </dependency>
  107. <dependency>
  108. <groupId>com.sun.jersey</groupId>
  109. <artifactId>jersey-core</artifactId>
  110. <scope>compile</scope>
  111. </dependency>
  112. <dependency>
  113. <!-- Used, even though 'mvn dependency:analyze' doesn't find it -->
  114. <groupId>com.sun.jersey</groupId>
  115. <artifactId>jersey-json</artifactId>
  116. <scope>compile</scope>
  117. </dependency>
  118. <dependency>
  119. <groupId>com.sun.jersey</groupId>
  120. <artifactId>jersey-server</artifactId>
  121. <scope>compile</scope>
  122. </dependency>
  123. <dependency>
  124. <groupId>commons-logging</groupId>
  125. <artifactId>commons-logging</artifactId>
  126. <scope>compile</scope>
  127. </dependency>
  128. <dependency>
  129. <groupId>log4j</groupId>
  130. <artifactId>log4j</artifactId>
  131. <scope>compile</scope>
  132. </dependency>
  133. <dependency>
  134. <groupId>net.java.dev.jets3t</groupId>
  135. <artifactId>jets3t</artifactId>
  136. <scope>compile</scope>
  137. </dependency>
  138. <dependency>
  139. <groupId>junit</groupId>
  140. <artifactId>junit</artifactId>
  141. <scope>test</scope>
  142. </dependency>
  143. <dependency>
  144. <groupId>commons-lang</groupId>
  145. <artifactId>commons-lang</artifactId>
  146. <scope>compile</scope>
  147. </dependency>
  148. <dependency>
  149. <groupId>commons-configuration</groupId>
  150. <artifactId>commons-configuration</artifactId>
  151. <scope>compile</scope>
  152. </dependency>
  153. <dependency>
  154. <groupId>org.slf4j</groupId>
  155. <artifactId>slf4j-api</artifactId>
  156. <scope>compile</scope>
  157. </dependency>
  158. <dependency>
  159. <groupId>org.slf4j</groupId>
  160. <artifactId>slf4j-log4j12</artifactId>
  161. <scope>runtime</scope>
  162. </dependency>
  163. <dependency>
  164. <groupId>org.codehaus.jackson</groupId>
  165. <artifactId>jackson-core-asl</artifactId>
  166. <scope>compile</scope>
  167. </dependency>
  168. <dependency>
  169. <groupId>org.codehaus.jackson</groupId>
  170. <artifactId>jackson-mapper-asl</artifactId>
  171. <scope>compile</scope>
  172. </dependency>
  173. <dependency>
  174. <groupId>org.mockito</groupId>
  175. <artifactId>mockito-all</artifactId>
  176. <scope>test</scope>
  177. </dependency>
  178. <dependency>
  179. <groupId>org.apache.avro</groupId>
  180. <artifactId>avro</artifactId>
  181. <scope>compile</scope>
  182. </dependency>
  183. <dependency>
  184. <groupId>org.apache.ant</groupId>
  185. <artifactId>ant</artifactId>
  186. <scope>provided</scope>
  187. </dependency>
  188. <dependency>
  189. <groupId>com.google.protobuf</groupId>
  190. <artifactId>protobuf-java</artifactId>
  191. <scope>compile</scope>
  192. </dependency>
  193. <dependency>
  194. <groupId>com.google.code.gson</groupId>
  195. <artifactId>gson</artifactId>
  196. </dependency>
  197. <dependency>
  198. <groupId>org.apache.hadoop</groupId>
  199. <artifactId>hadoop-auth</artifactId>
  200. <scope>compile</scope>
  201. </dependency>
  202. <dependency>
  203. <groupId>org.apache.hadoop</groupId>
  204. <artifactId>hadoop-auth</artifactId>
  205. <type>test-jar</type>
  206. <scope>test</scope>
  207. </dependency>
  208. <dependency>
  209. <groupId>org.apache.hadoop</groupId>
  210. <artifactId>hadoop-minikdc</artifactId>
  211. <scope>test</scope>
  212. </dependency>
  213. <dependency>
  214. <groupId>com.jcraft</groupId>
  215. <artifactId>jsch</artifactId>
  216. </dependency>
  217. <dependency>
  218. <groupId>org.apache.curator</groupId>
  219. <artifactId>curator-test</artifactId>
  220. <scope>test</scope>
  221. </dependency>
  222. <dependency>
  223. <groupId>org.apache.curator</groupId>
  224. <artifactId>curator-client</artifactId>
  225. </dependency>
  226. <dependency>
  227. <groupId>org.apache.curator</groupId>
  228. <artifactId>curator-recipes</artifactId>
  229. </dependency>
  230. <dependency>
  231. <groupId>com.google.code.findbugs</groupId>
  232. <artifactId>jsr305</artifactId>
  233. <scope>compile</scope>
  234. </dependency>
  235. <dependency>
  236. <groupId>org.apache.sshd</groupId>
  237. <artifactId>sshd-core</artifactId>
  238. <scope>test</scope>
  239. </dependency>
  240. <dependency>
  241. <groupId>org.apache.htrace</groupId>
  242. <artifactId>htrace-core4</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. <phase>pre-site</phase>
  449. <goals>
  450. <goal>run</goal>
  451. </goals>
  452. <configuration>
  453. <tasks>
  454. <copy file="src/main/resources/core-default.xml" todir="src/site/resources"/>
  455. <copy file="src/main/xsl/configuration.xsl" todir="src/site/resources"/>
  456. </tasks>
  457. </configuration>
  458. </execution>
  459. </executions>
  460. </plugin>
  461. <plugin>
  462. <groupId>org.apache.rat</groupId>
  463. <artifactId>apache-rat-plugin</artifactId>
  464. <configuration>
  465. <excludes>
  466. <exclude>CHANGES.txt</exclude>
  467. <exclude>.idea/**</exclude>
  468. <exclude>src/main/conf/*</exclude>
  469. <exclude>src/main/docs/**</exclude>
  470. <exclude>dev-support/jdiff/**</exclude>
  471. <exclude>src/main/native/*</exclude>
  472. <exclude>src/main/native/config/*</exclude>
  473. <exclude>src/main/native/m4/*</exclude>
  474. <exclude>src/test/empty-file</exclude>
  475. <exclude>src/test/all-tests</exclude>
  476. <exclude>src/test/resources/kdc/ldif/users.ldif</exclude>
  477. <exclude>src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4.h</exclude>
  478. <exclude>src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4.c</exclude>
  479. <exclude>src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4hc.h</exclude>
  480. <exclude>src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4hc.c</exclude>
  481. <exclude>src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4hc_encoder.h</exclude>
  482. <exclude>src/test/resources/test-untar.tgz</exclude>
  483. <exclude>src/test/resources/test.har/_SUCCESS</exclude>
  484. <exclude>src/test/resources/test.har/_index</exclude>
  485. <exclude>src/test/resources/test.har/_masterindex</exclude>
  486. <exclude>src/test/resources/test.har/part-0</exclude>
  487. <exclude>src/test/resources/javakeystoreprovider.password</exclude>
  488. </excludes>
  489. </configuration>
  490. </plugin>
  491. </plugins>
  492. </build>
  493. <profiles>
  494. <profile>
  495. <id>native</id>
  496. <activation>
  497. <activeByDefault>false</activeByDefault>
  498. </activation>
  499. <properties>
  500. <require.bzip2>false</require.bzip2>
  501. <snappy.prefix></snappy.prefix>
  502. <snappy.lib></snappy.lib>
  503. <snappy.include></snappy.include>
  504. <require.snappy>false</require.snappy>
  505. <openssl.prefix></openssl.prefix>
  506. <openssl.lib></openssl.lib>
  507. <openssl.include></openssl.include>
  508. <require.openssl>false</require.openssl>
  509. <runningWithNative>true</runningWithNative>
  510. <bundle.openssl.in.bin>false</bundle.openssl.in.bin>
  511. <extra.libhadoop.rpath></extra.libhadoop.rpath>
  512. </properties>
  513. <build>
  514. <plugins>
  515. <plugin>
  516. <groupId>org.apache.maven.plugins</groupId>
  517. <artifactId>maven-enforcer-plugin</artifactId>
  518. <executions>
  519. <execution>
  520. <id>enforce-os</id>
  521. <goals>
  522. <goal>enforce</goal>
  523. </goals>
  524. <configuration>
  525. <rules>
  526. <requireOS>
  527. <family>mac</family>
  528. <family>unix</family>
  529. <message>native build only supported on Mac or Unix</message>
  530. </requireOS>
  531. </rules>
  532. <fail>true</fail>
  533. </configuration>
  534. </execution>
  535. </executions>
  536. </plugin>
  537. <plugin>
  538. <groupId>org.codehaus.mojo</groupId>
  539. <artifactId>native-maven-plugin</artifactId>
  540. <executions>
  541. <execution>
  542. <phase>compile</phase>
  543. <goals>
  544. <goal>javah</goal>
  545. </goals>
  546. <configuration>
  547. <javahPath>${env.JAVA_HOME}/bin/javah</javahPath>
  548. <javahClassNames>
  549. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibCompressor</javahClassName>
  550. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibDecompressor</javahClassName>
  551. <javahClassName>org.apache.hadoop.io.compress.bzip2.Bzip2Compressor</javahClassName>
  552. <javahClassName>org.apache.hadoop.io.compress.bzip2.Bzip2Decompressor</javahClassName>
  553. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsMapping</javahClassName>
  554. <javahClassName>org.apache.hadoop.io.nativeio.NativeIO</javahClassName>
  555. <javahClassName>org.apache.hadoop.io.nativeio.SharedFileDescriptorFactory</javahClassName>
  556. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsNetgroupMapping</javahClassName>
  557. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyCompressor</javahClassName>
  558. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyDecompressor</javahClassName>
  559. <javahClassName>org.apache.hadoop.io.compress.lz4.Lz4Compressor</javahClassName>
  560. <javahClassName>org.apache.hadoop.io.compress.lz4.Lz4Decompressor</javahClassName>
  561. <javahClassName>org.apache.hadoop.crypto.OpensslCipher</javahClassName>
  562. <javahClassName>org.apache.hadoop.crypto.random.OpensslSecureRandom</javahClassName>
  563. <javahClassName>org.apache.hadoop.util.NativeCrc32</javahClassName>
  564. <javahClassName>org.apache.hadoop.net.unix.DomainSocket</javahClassName>
  565. <javahClassName>org.apache.hadoop.net.unix.DomainSocketWatcher</javahClassName>
  566. </javahClassNames>
  567. <javahOutputDirectory>${project.build.directory}/native/javah</javahOutputDirectory>
  568. </configuration>
  569. </execution>
  570. </executions>
  571. </plugin>
  572. <plugin>
  573. <groupId>org.apache.hadoop</groupId>
  574. <artifactId>hadoop-maven-plugins</artifactId>
  575. <executions>
  576. <execution>
  577. <id>cmake-compile</id>
  578. <phase>compile</phase>
  579. <goals><goal>cmake-compile</goal></goals>
  580. <configuration>
  581. <source>${basedir}/src</source>
  582. <vars>
  583. <GENERATED_JAVAH>${project.build.directory}/native/javah</GENERATED_JAVAH>
  584. <JVM_ARCH_DATA_MODEL>${sun.arch.data.model}</JVM_ARCH_DATA_MODEL>
  585. <REQUIRE_BZIP2>${require.bzip2}</REQUIRE_BZIP2>
  586. <REQUIRE_SNAPPY>${require.snappy}</REQUIRE_SNAPPY>
  587. <CUSTOM_SNAPPY_PREFIX>${snappy.prefix}</CUSTOM_SNAPPY_PREFIX>
  588. <CUSTOM_SNAPPY_LIB>${snappy.lib} </CUSTOM_SNAPPY_LIB>
  589. <CUSTOM_SNAPPY_INCLUDE>${snappy.include} </CUSTOM_SNAPPY_INCLUDE>
  590. <REQUIRE_OPENSSL>${require.openssl} </REQUIRE_OPENSSL>
  591. <CUSTOM_OPENSSL_PREFIX>${openssl.prefix} </CUSTOM_OPENSSL_PREFIX>
  592. <CUSTOM_OPENSSL_LIB>${openssl.lib} </CUSTOM_OPENSSL_LIB>
  593. <CUSTOM_OPENSSL_INCLUDE>${openssl.include} </CUSTOM_OPENSSL_INCLUDE>
  594. <EXTRA_LIBHADOOP_RPATH>${extra.libhadoop.rpath}</EXTRA_LIBHADOOP_RPATH>
  595. </vars>
  596. </configuration>
  597. </execution>
  598. <execution>
  599. <id>test_bulk_crc32</id>
  600. <goals><goal>cmake-test</goal></goals>
  601. <phase>test</phase>
  602. <configuration>
  603. <binary>${project.build.directory}/native/test_bulk_crc32</binary>
  604. <timeout>1200</timeout>
  605. <results>${project.build.directory}/native-results</results>
  606. </configuration>
  607. </execution>
  608. </executions>
  609. </plugin>
  610. </plugins>
  611. </build>
  612. </profile>
  613. <profile>
  614. <id>native-win</id>
  615. <activation>
  616. <os>
  617. <family>Windows</family>
  618. </os>
  619. </activation>
  620. <properties>
  621. <snappy.prefix></snappy.prefix>
  622. <snappy.lib></snappy.lib>
  623. <snappy.include></snappy.include>
  624. <require.snappy>false</require.snappy>
  625. <bundle.snappy.in.bin>true</bundle.snappy.in.bin>
  626. <openssl.prefix></openssl.prefix>
  627. <openssl.lib></openssl.lib>
  628. <openssl.include></openssl.include>
  629. <require.openssl>false</require.openssl>
  630. <runningWithNative>true</runningWithNative>
  631. <bundle.openssl.in.bin>false</bundle.openssl.in.bin>
  632. </properties>
  633. <build>
  634. <plugins>
  635. <plugin>
  636. <groupId>org.apache.maven.plugins</groupId>
  637. <artifactId>maven-enforcer-plugin</artifactId>
  638. <executions>
  639. <execution>
  640. <id>enforce-os</id>
  641. <goals>
  642. <goal>enforce</goal>
  643. </goals>
  644. <configuration>
  645. <rules>
  646. <requireOS>
  647. <family>windows</family>
  648. <message>native-win build only supported on Windows</message>
  649. </requireOS>
  650. </rules>
  651. <fail>true</fail>
  652. </configuration>
  653. </execution>
  654. </executions>
  655. </plugin>
  656. <plugin>
  657. <groupId>org.codehaus.mojo</groupId>
  658. <artifactId>native-maven-plugin</artifactId>
  659. <executions>
  660. <execution>
  661. <phase>compile</phase>
  662. <goals>
  663. <goal>javah</goal>
  664. </goals>
  665. <configuration>
  666. <javahPath>${env.JAVA_HOME}/bin/javah</javahPath>
  667. <javahClassNames>
  668. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibCompressor</javahClassName>
  669. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibDecompressor</javahClassName>
  670. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsMapping</javahClassName>
  671. <javahClassName>org.apache.hadoop.io.nativeio.NativeIO</javahClassName>
  672. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsNetgroupMapping</javahClassName>
  673. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyCompressor</javahClassName>
  674. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyDecompressor</javahClassName>
  675. <javahClassName>org.apache.hadoop.io.compress.lz4.Lz4Compressor</javahClassName>
  676. <javahClassName>org.apache.hadoop.io.compress.lz4.Lz4Decompressor</javahClassName>
  677. <javahClassName>org.apache.hadoop.crypto.OpensslCipher</javahClassName>
  678. <javahClassName>org.apache.hadoop.crypto.random.OpensslSecureRandom</javahClassName>
  679. <javahClassName>org.apache.hadoop.util.NativeCrc32</javahClassName>
  680. </javahClassNames>
  681. <javahOutputDirectory>${project.build.directory}/native/javah</javahOutputDirectory>
  682. </configuration>
  683. </execution>
  684. </executions>
  685. </plugin>
  686. <plugin>
  687. <groupId>org.codehaus.mojo</groupId>
  688. <artifactId>exec-maven-plugin</artifactId>
  689. <executions>
  690. <execution>
  691. <id>compile-ms-winutils</id>
  692. <phase>compile</phase>
  693. <goals>
  694. <goal>exec</goal>
  695. </goals>
  696. <configuration>
  697. <executable>msbuild</executable>
  698. <arguments>
  699. <argument>${basedir}/src/main/winutils/winutils.sln</argument>
  700. <argument>/nologo</argument>
  701. <argument>/p:Configuration=Release</argument>
  702. <argument>/p:OutDir=${project.build.directory}/bin/</argument>
  703. <argument>/p:IntermediateOutputPath=${project.build.directory}/winutils/</argument>
  704. <argument>/p:WsceConfigDir=${wsce.config.dir}</argument>
  705. <argument>/p:WsceConfigFile=${wsce.config.file}</argument>
  706. </arguments>
  707. </configuration>
  708. </execution>
  709. <execution>
  710. <id>compile-ms-native-dll</id>
  711. <phase>compile</phase>
  712. <goals>
  713. <goal>exec</goal>
  714. </goals>
  715. <configuration>
  716. <executable>msbuild</executable>
  717. <arguments>
  718. <argument>${basedir}/src/main/native/native.sln</argument>
  719. <argument>/nologo</argument>
  720. <argument>/p:Configuration=Release</argument>
  721. <argument>/p:OutDir=${project.build.directory}/bin/</argument>
  722. <argument>/p:CustomSnappyPrefix=${snappy.prefix}</argument>
  723. <argument>/p:CustomSnappyLib=${snappy.lib}</argument>
  724. <argument>/p:CustomSnappyInclude=${snappy.include}</argument>
  725. <argument>/p:RequireSnappy=${require.snappy}</argument>
  726. <argument>/p:CustomOpensslPrefix=${openssl.prefix}</argument>
  727. <argument>/p:CustomOpensslLib=${openssl.lib}</argument>
  728. <argument>/p:CustomOpensslInclude=${openssl.include}</argument>
  729. <argument>/p:RequireOpenssl=${require.openssl}</argument>
  730. </arguments>
  731. </configuration>
  732. </execution>
  733. </executions>
  734. </plugin>
  735. </plugins>
  736. </build>
  737. </profile>
  738. <profile>
  739. <id>parallel-tests</id>
  740. <build>
  741. <plugins>
  742. <plugin>
  743. <artifactId>maven-antrun-plugin</artifactId>
  744. <executions>
  745. <execution>
  746. <id>create-parallel-tests-dirs</id>
  747. <phase>test-compile</phase>
  748. <configuration>
  749. <target>
  750. <script language="javascript"><![CDATA[
  751. var baseDirs = [
  752. "${test.build.data}",
  753. "${test.build.dir}",
  754. "${hadoop.tmp.dir}" ];
  755. for (var i in baseDirs) {
  756. for (var j = 1; j <= ${testsThreadCount}; ++j) {
  757. var mkdir = project.createTask("mkdir");
  758. mkdir.setDir(new java.io.File(baseDirs[i], j));
  759. mkdir.perform();
  760. }
  761. }
  762. ]]></script>
  763. </target>
  764. </configuration>
  765. <goals>
  766. <goal>run</goal>
  767. </goals>
  768. </execution>
  769. </executions>
  770. </plugin>
  771. <plugin>
  772. <groupId>org.apache.maven.plugins</groupId>
  773. <artifactId>maven-surefire-plugin</artifactId>
  774. <configuration>
  775. <forkCount>${testsThreadCount}</forkCount>
  776. <reuseForks>false</reuseForks>
  777. <argLine>${maven-surefire-plugin.argLine} -DminiClusterDedicatedDirs=true</argLine>
  778. <systemPropertyVariables>
  779. <test.build.data>${test.build.data}/${surefire.forkNumber}</test.build.data>
  780. <test.build.dir>${test.build.dir}/${surefire.forkNumber}</test.build.dir>
  781. <hadoop.tmp.dir>${hadoop.tmp.dir}/${surefire.forkNumber}</hadoop.tmp.dir>
  782. <!-- Due to a Maven quirk, setting this to just -->
  783. <!-- surefire.forkNumber won't do the parameter substitution. -->
  784. <!-- Putting a prefix in front of it like "fork-" makes it -->
  785. <!-- work. -->
  786. <test.unique.fork.id>fork-${surefire.forkNumber}</test.unique.fork.id>
  787. </systemPropertyVariables>
  788. </configuration>
  789. </plugin>
  790. </plugins>
  791. </build>
  792. </profile>
  793. <profile>
  794. <id>releasedocs</id>
  795. <activation>
  796. <activeByDefault>false</activeByDefault>
  797. </activation>
  798. <build>
  799. <plugins>
  800. <plugin>
  801. <groupId>org.codehaus.mojo</groupId>
  802. <artifactId>exec-maven-plugin</artifactId>
  803. <executions>
  804. <execution>
  805. <id>releasedocs</id>
  806. <phase>pre-site</phase>
  807. <goals>
  808. <goal>exec</goal>
  809. </goals>
  810. <configuration>
  811. <executable>${basedir}/../../dev-support/bin/releasedocmaker</executable>
  812. <workingDirectory>src/site/markdown/release/</workingDirectory>
  813. <requiresOnline>true</requiresOnline>
  814. <arguments>
  815. <argument>--index</argument>
  816. <argument>--license</argument>
  817. <argument>--project</argument>
  818. <argument>HADOOP</argument>
  819. <argument>--project</argument>
  820. <argument>HDFS</argument>
  821. <argument>--project</argument>
  822. <argument>MAPREDUCE</argument>
  823. <argument>--project</argument>
  824. <argument>YARN</argument>
  825. <argument>--projecttitle</argument>
  826. <argument>"Apache Hadoop"</argument>
  827. <argument>--usetoday</argument>
  828. <argument>--version</argument>
  829. <argument>${project.version}</argument>
  830. </arguments>
  831. </configuration>
  832. </execution>
  833. </executions>
  834. </plugin>
  835. <plugin>
  836. <artifactId>maven-clean-plugin</artifactId>
  837. <configuration>
  838. <filesets>
  839. <fileset>
  840. <directory>src/site/markdown/release</directory>
  841. <includes>
  842. <include>${project.version}</include>
  843. </includes>
  844. <followSymlinks>false</followSymlinks>
  845. </fileset>
  846. </filesets>
  847. </configuration>
  848. </plugin>
  849. </plugins>
  850. </build>
  851. </profile>
  852. </profiles>
  853. </project>