pom.xml 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922
  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. https://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.10.0</version>
  22. <relativePath>../../hadoop-project-dist</relativePath>
  23. </parent>
  24. <groupId>org.apache.hadoop</groupId>
  25. <artifactId>hadoop-common</artifactId>
  26. <version>2.10.0</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. <exclusions>
  159. <exclusion>
  160. <groupId>commons-beanutils</groupId>
  161. <artifactId>commons-beanutils-core</artifactId>
  162. </exclusion>
  163. <exclusion>
  164. <groupId>commons-digester</groupId>
  165. <artifactId>commons-digester</artifactId>
  166. </exclusion>
  167. </exclusions>
  168. </dependency>
  169. <dependency>
  170. <groupId>commons-digester</groupId>
  171. <artifactId>commons-digester</artifactId>
  172. <exclusions>
  173. <exclusion>
  174. <groupId>commons-beanutils</groupId>
  175. <artifactId>commons-beanutils</artifactId>
  176. </exclusion>
  177. </exclusions>
  178. <scope>compile</scope>
  179. </dependency>
  180. <dependency>
  181. <groupId>commons-beanutils</groupId>
  182. <artifactId>commons-beanutils</artifactId>
  183. <scope>compile</scope>
  184. </dependency>
  185. <dependency>
  186. <groupId>org.apache.commons</groupId>
  187. <artifactId>commons-lang3</artifactId>
  188. <scope>compile</scope>
  189. </dependency>
  190. <dependency>
  191. <groupId>org.slf4j</groupId>
  192. <artifactId>slf4j-api</artifactId>
  193. <scope>compile</scope>
  194. </dependency>
  195. <dependency>
  196. <groupId>org.slf4j</groupId>
  197. <artifactId>slf4j-log4j12</artifactId>
  198. <scope>compile</scope>
  199. </dependency>
  200. <dependency>
  201. <groupId>org.codehaus.jackson</groupId>
  202. <artifactId>jackson-core-asl</artifactId>
  203. <scope>compile</scope>
  204. </dependency>
  205. <dependency>
  206. <groupId>org.codehaus.jackson</groupId>
  207. <artifactId>jackson-mapper-asl</artifactId>
  208. <scope>compile</scope>
  209. </dependency>
  210. <dependency>
  211. <groupId>org.mockito</groupId>
  212. <artifactId>mockito-all</artifactId>
  213. <scope>test</scope>
  214. </dependency>
  215. <dependency>
  216. <groupId>org.apache.avro</groupId>
  217. <artifactId>avro</artifactId>
  218. <scope>compile</scope>
  219. </dependency>
  220. <dependency>
  221. <groupId>org.apache.ant</groupId>
  222. <artifactId>ant</artifactId>
  223. <scope>provided</scope>
  224. </dependency>
  225. <dependency>
  226. <groupId>com.google.protobuf</groupId>
  227. <artifactId>protobuf-java</artifactId>
  228. <scope>compile</scope>
  229. </dependency>
  230. <dependency>
  231. <groupId>com.google.code.gson</groupId>
  232. <artifactId>gson</artifactId>
  233. </dependency>
  234. <dependency>
  235. <groupId>org.apache.hadoop</groupId>
  236. <artifactId>hadoop-auth</artifactId>
  237. <scope>compile</scope>
  238. </dependency>
  239. <dependency>
  240. <groupId>org.apache.hadoop</groupId>
  241. <artifactId>hadoop-auth</artifactId>
  242. <type>test-jar</type>
  243. <scope>test</scope>
  244. </dependency>
  245. <dependency>
  246. <groupId>org.apache.hadoop</groupId>
  247. <artifactId>hadoop-minikdc</artifactId>
  248. <scope>test</scope>
  249. </dependency>
  250. <dependency>
  251. <groupId>com.jcraft</groupId>
  252. <artifactId>jsch</artifactId>
  253. </dependency>
  254. <dependency>
  255. <groupId>org.apache.curator</groupId>
  256. <artifactId>curator-test</artifactId>
  257. <scope>test</scope>
  258. </dependency>
  259. <dependency>
  260. <groupId>org.apache.curator</groupId>
  261. <artifactId>curator-client</artifactId>
  262. </dependency>
  263. <dependency>
  264. <groupId>org.apache.curator</groupId>
  265. <artifactId>curator-recipes</artifactId>
  266. </dependency>
  267. <dependency>
  268. <groupId>com.google.code.findbugs</groupId>
  269. <artifactId>jsr305</artifactId>
  270. <scope>compile</scope>
  271. </dependency>
  272. <dependency>
  273. <groupId>org.apache.sshd</groupId>
  274. <artifactId>sshd-core</artifactId>
  275. <scope>test</scope>
  276. </dependency>
  277. <dependency>
  278. <groupId>org.apache.htrace</groupId>
  279. <artifactId>htrace-core4</artifactId>
  280. </dependency>
  281. <dependency>
  282. <groupId>org.apache.zookeeper</groupId>
  283. <artifactId>zookeeper</artifactId>
  284. <exclusions>
  285. <exclusion>
  286. <groupId>jline</groupId>
  287. <artifactId>jline</artifactId>
  288. </exclusion>
  289. <exclusion>
  290. <groupId>org.jboss.netty</groupId>
  291. <artifactId>netty</artifactId>
  292. </exclusion>
  293. <exclusion>
  294. <!-- otherwise seems to drag in junit 3.8.1 via jline -->
  295. <groupId>junit</groupId>
  296. <artifactId>junit</artifactId>
  297. </exclusion>
  298. <exclusion>
  299. <groupId>com.sun.jdmk</groupId>
  300. <artifactId>jmxtools</artifactId>
  301. </exclusion>
  302. <exclusion>
  303. <groupId>com.sun.jmx</groupId>
  304. <artifactId>jmxri</artifactId>
  305. </exclusion>
  306. </exclusions>
  307. </dependency>
  308. <dependency>
  309. <groupId>org.apache.zookeeper</groupId>
  310. <artifactId>zookeeper</artifactId>
  311. <type>test-jar</type>
  312. <scope>test</scope>
  313. </dependency>
  314. <dependency>
  315. <groupId>org.apache.commons</groupId>
  316. <artifactId>commons-compress</artifactId>
  317. </dependency>
  318. <dependency>
  319. <groupId>org.bouncycastle</groupId>
  320. <artifactId>bcprov-jdk16</artifactId>
  321. <scope>test</scope>
  322. </dependency>
  323. <dependency>
  324. <groupId>org.codehaus.woodstox</groupId>
  325. <artifactId>stax2-api</artifactId>
  326. <scope>compile</scope>
  327. </dependency>
  328. <dependency>
  329. <groupId>com.fasterxml.woodstox</groupId>
  330. <artifactId>woodstox-core</artifactId>
  331. <scope>compile</scope>
  332. </dependency>
  333. <dependency>
  334. <groupId>com.squareup.okhttp3</groupId>
  335. <artifactId>mockwebserver</artifactId>
  336. <scope>test</scope>
  337. </dependency>
  338. </dependencies>
  339. <build>
  340. <!--
  341. Include all files in src/main/resources. By default, do not apply property
  342. substitution (filtering=false), but do apply property substitution to
  343. common-version-info.properties (filtering=true). This will substitute the
  344. version information correctly, but prevent Maven from altering other files
  345. like core-default.xml.
  346. -->
  347. <resources>
  348. <resource>
  349. <directory>${basedir}/src/main/resources</directory>
  350. <excludes>
  351. <exclude>common-version-info.properties</exclude>
  352. </excludes>
  353. <filtering>false</filtering>
  354. </resource>
  355. <resource>
  356. <directory>${basedir}/src/main/resources</directory>
  357. <includes>
  358. <include>common-version-info.properties</include>
  359. </includes>
  360. <filtering>true</filtering>
  361. </resource>
  362. </resources>
  363. <plugins>
  364. <plugin>
  365. <groupId>org.apache.hadoop</groupId>
  366. <artifactId>hadoop-maven-plugins</artifactId>
  367. <executions>
  368. <execution>
  369. <id>version-info</id>
  370. <phase>generate-resources</phase>
  371. <goals>
  372. <goal>version-info</goal>
  373. </goals>
  374. <configuration>
  375. <source>
  376. <directory>${basedir}/src/main</directory>
  377. <includes>
  378. <include>java/**/*.java</include>
  379. <include>proto/**/*.proto</include>
  380. </includes>
  381. </source>
  382. </configuration>
  383. </execution>
  384. <execution>
  385. <id>compile-protoc</id>
  386. <goals>
  387. <goal>protoc</goal>
  388. </goals>
  389. <configuration>
  390. <protocVersion>${protobuf.version}</protocVersion>
  391. <protocCommand>${protoc.path}</protocCommand>
  392. <imports>
  393. <param>${basedir}/src/main/proto</param>
  394. </imports>
  395. <source>
  396. <directory>${basedir}/src/main/proto</directory>
  397. <includes>
  398. <include>HAServiceProtocol.proto</include>
  399. <include>IpcConnectionContext.proto</include>
  400. <include>ProtocolInfo.proto</include>
  401. <include>RpcHeader.proto</include>
  402. <include>ZKFCProtocol.proto</include>
  403. <include>ProtobufRpcEngine.proto</include>
  404. <include>Security.proto</include>
  405. <include>GetUserMappingsProtocol.proto</include>
  406. <include>TraceAdmin.proto</include>
  407. <include>RefreshAuthorizationPolicyProtocol.proto</include>
  408. <include>RefreshUserMappingsProtocol.proto</include>
  409. <include>RefreshCallQueueProtocol.proto</include>
  410. <include>GenericRefreshProtocol.proto</include>
  411. </includes>
  412. </source>
  413. </configuration>
  414. </execution>
  415. <execution>
  416. <id>compile-test-protoc</id>
  417. <goals>
  418. <goal>test-protoc</goal>
  419. </goals>
  420. <configuration>
  421. <protocVersion>${protobuf.version}</protocVersion>
  422. <protocCommand>${protoc.path}</protocCommand>
  423. <imports>
  424. <param>${basedir}/src/test/proto</param>
  425. </imports>
  426. <source>
  427. <directory>${basedir}/src/test/proto</directory>
  428. <includes>
  429. <include>test.proto</include>
  430. <include>test_rpc_service.proto</include>
  431. </includes>
  432. </source>
  433. </configuration>
  434. </execution>
  435. </executions>
  436. </plugin>
  437. <plugin>
  438. <groupId>org.apache.maven.plugins</groupId>
  439. <artifactId>maven-surefire-plugin</artifactId>
  440. <configuration>
  441. <systemPropertyVariables>
  442. <startKdc>${startKdc}</startKdc>
  443. <kdc.resource.dir>${kdc.resource.dir}</kdc.resource.dir>
  444. <runningWithNative>${runningWithNative}</runningWithNative>
  445. </systemPropertyVariables>
  446. <properties>
  447. <property>
  448. <name>listener</name>
  449. <value>org.apache.hadoop.test.TimedOutTestsListener</value>
  450. </property>
  451. </properties>
  452. </configuration>
  453. </plugin>
  454. <plugin>
  455. <groupId>org.apache.avro</groupId>
  456. <artifactId>avro-maven-plugin</artifactId>
  457. <executions>
  458. <execution>
  459. <id>generate-avro-test-sources</id>
  460. <phase>generate-test-sources</phase>
  461. <goals>
  462. <goal>schema</goal>
  463. </goals>
  464. </execution>
  465. </executions>
  466. <configuration>
  467. <testOutputDirectory>${project.build.directory}/generated-test-sources/java</testOutputDirectory>
  468. </configuration>
  469. </plugin>
  470. <plugin>
  471. <groupId>org.apache.maven.plugins</groupId>
  472. <artifactId>maven-antrun-plugin</artifactId>
  473. <executions>
  474. <execution>
  475. <id>create-log-dir</id>
  476. <phase>process-test-resources</phase>
  477. <goals>
  478. <goal>run</goal>
  479. </goals>
  480. <configuration>
  481. <target>
  482. <!--
  483. TODO: there are tests (TestLocalFileSystem#testCopy) that fail if data
  484. TODO: from a previous run is present
  485. -->
  486. <delete dir="${test.build.data}"/>
  487. <mkdir dir="${test.build.data}"/>
  488. <mkdir dir="${hadoop.log.dir}"/>
  489. <copy toDir="${project.build.directory}/test-classes">
  490. <fileset dir="${basedir}/src/main/conf"/>
  491. </copy>
  492. </target>
  493. </configuration>
  494. </execution>
  495. <execution>
  496. <phase>pre-site</phase>
  497. <goals>
  498. <goal>run</goal>
  499. </goals>
  500. <configuration>
  501. <tasks>
  502. <copy file="src/main/resources/core-default.xml" todir="src/site/resources"/>
  503. <copy file="src/main/xsl/configuration.xsl" todir="src/site/resources"/>
  504. </tasks>
  505. </configuration>
  506. </execution>
  507. </executions>
  508. </plugin>
  509. <plugin>
  510. <groupId>org.apache.rat</groupId>
  511. <artifactId>apache-rat-plugin</artifactId>
  512. <configuration>
  513. <excludes>
  514. <exclude>.idea/**</exclude>
  515. <exclude>src/main/conf/*</exclude>
  516. <exclude>dev-support/jdiff/**</exclude>
  517. <exclude>src/main/native/*</exclude>
  518. <exclude>src/main/native/config/*</exclude>
  519. <exclude>src/main/native/m4/*</exclude>
  520. <exclude>src/test/empty-file</exclude>
  521. <exclude>src/test/all-tests</exclude>
  522. <exclude>src/test/resources/kdc/ldif/users.ldif</exclude>
  523. <exclude>src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4.h</exclude>
  524. <exclude>src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4.c</exclude>
  525. <exclude>src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4hc.h</exclude>
  526. <exclude>src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4hc.c</exclude>
  527. <exclude>src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4hc_encoder.h</exclude>
  528. <exclude>src/main/native/gtest/**/*</exclude>
  529. <exclude>src/test/resources/test-untar.tgz</exclude>
  530. <exclude>src/test/resources/test.har/_SUCCESS</exclude>
  531. <exclude>src/test/resources/test.har/_index</exclude>
  532. <exclude>src/test/resources/test.har/_masterindex</exclude>
  533. <exclude>src/test/resources/test.har/part-0</exclude>
  534. <exclude>src/test/resources/javakeystoreprovider.password</exclude>
  535. <exclude>dev-support/jdiff-workaround.patch</exclude>
  536. </excludes>
  537. </configuration>
  538. </plugin>
  539. </plugins>
  540. </build>
  541. <profiles>
  542. <profile>
  543. <id>native</id>
  544. <activation>
  545. <activeByDefault>false</activeByDefault>
  546. </activation>
  547. <properties>
  548. <require.bzip2>false</require.bzip2>
  549. <snappy.prefix></snappy.prefix>
  550. <snappy.lib></snappy.lib>
  551. <snappy.include></snappy.include>
  552. <require.snappy>false</require.snappy>
  553. <zstd.prefix></zstd.prefix>
  554. <zstd.lib></zstd.lib>
  555. <zstd.include></zstd.include>
  556. <require.zstd>false</require.zstd>
  557. <openssl.prefix></openssl.prefix>
  558. <openssl.lib></openssl.lib>
  559. <openssl.include></openssl.include>
  560. <require.openssl>false</require.openssl>
  561. <runningWithNative>true</runningWithNative>
  562. <bundle.openssl.in.bin>false</bundle.openssl.in.bin>
  563. <extra.libhadoop.rpath></extra.libhadoop.rpath>
  564. </properties>
  565. <build>
  566. <plugins>
  567. <plugin>
  568. <groupId>org.apache.maven.plugins</groupId>
  569. <artifactId>maven-enforcer-plugin</artifactId>
  570. <executions>
  571. <execution>
  572. <id>enforce-os</id>
  573. <goals>
  574. <goal>enforce</goal>
  575. </goals>
  576. <configuration>
  577. <rules>
  578. <requireOS>
  579. <family>mac</family>
  580. <family>unix</family>
  581. <message>native build only supported on Mac or Unix</message>
  582. </requireOS>
  583. </rules>
  584. <fail>true</fail>
  585. </configuration>
  586. </execution>
  587. </executions>
  588. </plugin>
  589. <plugin>
  590. <groupId>org.codehaus.mojo</groupId>
  591. <artifactId>native-maven-plugin</artifactId>
  592. <executions>
  593. <execution>
  594. <phase>compile</phase>
  595. <goals>
  596. <goal>javah</goal>
  597. </goals>
  598. <configuration>
  599. <javahPath>${env.JAVA_HOME}/bin/javah</javahPath>
  600. <javahClassNames>
  601. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibCompressor</javahClassName>
  602. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibDecompressor</javahClassName>
  603. <javahClassName>org.apache.hadoop.io.compress.bzip2.Bzip2Compressor</javahClassName>
  604. <javahClassName>org.apache.hadoop.io.compress.bzip2.Bzip2Decompressor</javahClassName>
  605. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsMapping</javahClassName>
  606. <javahClassName>org.apache.hadoop.io.nativeio.NativeIO</javahClassName>
  607. <javahClassName>org.apache.hadoop.io.nativeio.SharedFileDescriptorFactory</javahClassName>
  608. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsNetgroupMapping</javahClassName>
  609. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyCompressor</javahClassName>
  610. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyDecompressor</javahClassName>
  611. <javahClassName>org.apache.hadoop.io.compress.zstd.ZStandardCompressor</javahClassName>
  612. <javahClassName>org.apache.hadoop.io.compress.zstd.ZStandardDecompressor</javahClassName>
  613. <javahClassName>org.apache.hadoop.io.compress.lz4.Lz4Compressor</javahClassName>
  614. <javahClassName>org.apache.hadoop.io.compress.lz4.Lz4Decompressor</javahClassName>
  615. <javahClassName>org.apache.hadoop.crypto.OpensslCipher</javahClassName>
  616. <javahClassName>org.apache.hadoop.crypto.random.OpensslSecureRandom</javahClassName>
  617. <javahClassName>org.apache.hadoop.util.NativeCrc32</javahClassName>
  618. <javahClassName>org.apache.hadoop.net.unix.DomainSocket</javahClassName>
  619. <javahClassName>org.apache.hadoop.net.unix.DomainSocketWatcher</javahClassName>
  620. </javahClassNames>
  621. <javahOutputDirectory>${project.build.directory}/native/javah</javahOutputDirectory>
  622. </configuration>
  623. </execution>
  624. </executions>
  625. </plugin>
  626. <plugin>
  627. <groupId>org.apache.hadoop</groupId>
  628. <artifactId>hadoop-maven-plugins</artifactId>
  629. <executions>
  630. <execution>
  631. <id>cmake-compile</id>
  632. <phase>compile</phase>
  633. <goals><goal>cmake-compile</goal></goals>
  634. <configuration>
  635. <source>${basedir}/src</source>
  636. <vars>
  637. <GENERATED_JAVAH>${project.build.directory}/native/javah</GENERATED_JAVAH>
  638. <JVM_ARCH_DATA_MODEL>${sun.arch.data.model}</JVM_ARCH_DATA_MODEL>
  639. <REQUIRE_BZIP2>${require.bzip2}</REQUIRE_BZIP2>
  640. <REQUIRE_SNAPPY>${require.snappy}</REQUIRE_SNAPPY>
  641. <CUSTOM_SNAPPY_PREFIX>${snappy.prefix}</CUSTOM_SNAPPY_PREFIX>
  642. <CUSTOM_SNAPPY_LIB>${snappy.lib} </CUSTOM_SNAPPY_LIB>
  643. <CUSTOM_SNAPPY_INCLUDE>${snappy.include} </CUSTOM_SNAPPY_INCLUDE>
  644. <REQUIRE_ZSTD>${require.zstd}</REQUIRE_ZSTD>
  645. <CUSTOM_ZSTD_PREFIX>${zstd.prefix}</CUSTOM_ZSTD_PREFIX>
  646. <CUSTOM_ZSTD_LIB>${zstd.lib}</CUSTOM_ZSTD_LIB>
  647. <CUSTOM_ZSTD_INCLUDE>${zstd.include}</CUSTOM_ZSTD_INCLUDE>
  648. <REQUIRE_OPENSSL>${require.openssl} </REQUIRE_OPENSSL>
  649. <CUSTOM_OPENSSL_PREFIX>${openssl.prefix} </CUSTOM_OPENSSL_PREFIX>
  650. <CUSTOM_OPENSSL_LIB>${openssl.lib} </CUSTOM_OPENSSL_LIB>
  651. <CUSTOM_OPENSSL_INCLUDE>${openssl.include} </CUSTOM_OPENSSL_INCLUDE>
  652. <EXTRA_LIBHADOOP_RPATH>${extra.libhadoop.rpath}</EXTRA_LIBHADOOP_RPATH>
  653. </vars>
  654. </configuration>
  655. </execution>
  656. <execution>
  657. <id>test_bulk_crc32</id>
  658. <goals><goal>cmake-test</goal></goals>
  659. <phase>test</phase>
  660. <configuration>
  661. <binary>${project.build.directory}/native/test_bulk_crc32</binary>
  662. <timeout>1200</timeout>
  663. <results>${project.build.directory}/native-results</results>
  664. </configuration>
  665. </execution>
  666. </executions>
  667. </plugin>
  668. </plugins>
  669. </build>
  670. </profile>
  671. <profile>
  672. <id>native-win</id>
  673. <activation>
  674. <os>
  675. <family>Windows</family>
  676. </os>
  677. </activation>
  678. <properties>
  679. <snappy.prefix></snappy.prefix>
  680. <snappy.lib></snappy.lib>
  681. <snappy.include></snappy.include>
  682. <require.snappy>false</require.snappy>
  683. <bundle.snappy.in.bin>true</bundle.snappy.in.bin>
  684. <zstd.prefix></zstd.prefix>
  685. <zstd.lib></zstd.lib>
  686. <zstd.include></zstd.include>
  687. <require.zstd>false</require.zstd>
  688. <bundle.zstd.in.bin>true</bundle.zstd.in.bin>
  689. <openssl.prefix></openssl.prefix>
  690. <openssl.lib></openssl.lib>
  691. <openssl.include></openssl.include>
  692. <require.openssl>false</require.openssl>
  693. <runningWithNative>true</runningWithNative>
  694. <bundle.openssl.in.bin>false</bundle.openssl.in.bin>
  695. </properties>
  696. <build>
  697. <plugins>
  698. <plugin>
  699. <groupId>org.apache.maven.plugins</groupId>
  700. <artifactId>maven-enforcer-plugin</artifactId>
  701. <executions>
  702. <execution>
  703. <id>enforce-os</id>
  704. <goals>
  705. <goal>enforce</goal>
  706. </goals>
  707. <configuration>
  708. <rules>
  709. <requireOS>
  710. <family>windows</family>
  711. <message>native-win build only supported on Windows</message>
  712. </requireOS>
  713. </rules>
  714. <fail>true</fail>
  715. </configuration>
  716. </execution>
  717. </executions>
  718. </plugin>
  719. <plugin>
  720. <groupId>org.codehaus.mojo</groupId>
  721. <artifactId>native-maven-plugin</artifactId>
  722. <executions>
  723. <execution>
  724. <phase>compile</phase>
  725. <goals>
  726. <goal>javah</goal>
  727. </goals>
  728. <configuration>
  729. <javahPath>${env.JAVA_HOME}/bin/javah</javahPath>
  730. <javahClassNames>
  731. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibCompressor</javahClassName>
  732. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibDecompressor</javahClassName>
  733. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsMapping</javahClassName>
  734. <javahClassName>org.apache.hadoop.io.nativeio.NativeIO</javahClassName>
  735. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsNetgroupMapping</javahClassName>
  736. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyCompressor</javahClassName>
  737. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyDecompressor</javahClassName>
  738. <javahClassName>org.apache.hadoop.io.compress.zstd.ZStandardCompressor</javahClassName>
  739. <javahClassName>org.apache.hadoop.io.compress.zstd.ZStandardDecompressor</javahClassName>
  740. <javahClassName>org.apache.hadoop.io.compress.lz4.Lz4Compressor</javahClassName>
  741. <javahClassName>org.apache.hadoop.io.compress.lz4.Lz4Decompressor</javahClassName>
  742. <javahClassName>org.apache.hadoop.crypto.OpensslCipher</javahClassName>
  743. <javahClassName>org.apache.hadoop.crypto.random.OpensslSecureRandom</javahClassName>
  744. <javahClassName>org.apache.hadoop.util.NativeCrc32</javahClassName>
  745. </javahClassNames>
  746. <javahOutputDirectory>${project.build.directory}/native/javah</javahOutputDirectory>
  747. </configuration>
  748. </execution>
  749. </executions>
  750. </plugin>
  751. <plugin>
  752. <groupId>org.codehaus.mojo</groupId>
  753. <artifactId>exec-maven-plugin</artifactId>
  754. <executions>
  755. <execution>
  756. <id>compile-ms-winutils</id>
  757. <phase>compile</phase>
  758. <goals>
  759. <goal>exec</goal>
  760. </goals>
  761. <configuration>
  762. <executable>msbuild</executable>
  763. <arguments>
  764. <argument>${basedir}/src/main/winutils/winutils.sln</argument>
  765. <argument>/nologo</argument>
  766. <argument>/p:Configuration=Release</argument>
  767. <argument>/p:OutDir=${project.build.directory}/bin/</argument>
  768. <argument>/p:IntermediateOutputPath=${project.build.directory}/winutils/</argument>
  769. <argument>/p:WsceConfigDir=${wsce.config.dir}</argument>
  770. <argument>/p:WsceConfigFile=${wsce.config.file}</argument>
  771. </arguments>
  772. </configuration>
  773. </execution>
  774. <execution>
  775. <id>compile-ms-native-dll</id>
  776. <phase>compile</phase>
  777. <goals>
  778. <goal>exec</goal>
  779. </goals>
  780. <configuration>
  781. <executable>msbuild</executable>
  782. <arguments>
  783. <argument>${basedir}/src/main/native/native.sln</argument>
  784. <argument>/nologo</argument>
  785. <argument>/p:Configuration=Release</argument>
  786. <argument>/p:OutDir=${project.build.directory}/bin/</argument>
  787. <argument>/p:CustomSnappyPrefix=${snappy.prefix}</argument>
  788. <argument>/p:CustomSnappyLib=${snappy.lib}</argument>
  789. <argument>/p:CustomSnappyInclude=${snappy.include}</argument>
  790. <argument>/p:RequireSnappy=${require.snappy}</argument>
  791. <argument>/p:CustomZstdPrefix=${zstd.prefix}</argument>
  792. <argument>/p:CustomZstdLib=${zstd.lib}</argument>
  793. <argument>/p:CustomZstdInclude=${zstd.include}</argument>
  794. <argument>/p:RequireZstd=${require.zstd}</argument>
  795. <argument>/p:CustomOpensslPrefix=${openssl.prefix}</argument>
  796. <argument>/p:CustomOpensslLib=${openssl.lib}</argument>
  797. <argument>/p:CustomOpensslInclude=${openssl.include}</argument>
  798. <argument>/p:RequireOpenssl=${require.openssl}</argument>
  799. </arguments>
  800. </configuration>
  801. </execution>
  802. </executions>
  803. </plugin>
  804. </plugins>
  805. </build>
  806. </profile>
  807. <profile>
  808. <id>parallel-tests</id>
  809. <build>
  810. <plugins>
  811. <plugin>
  812. <groupId>org.apache.hadoop</groupId>
  813. <artifactId>hadoop-maven-plugins</artifactId>
  814. <executions>
  815. <execution>
  816. <id>parallel-tests-createdir</id>
  817. <goals>
  818. <goal>parallel-tests-createdir</goal>
  819. </goals>
  820. </execution>
  821. </executions>
  822. </plugin>
  823. <plugin>
  824. <groupId>org.apache.maven.plugins</groupId>
  825. <artifactId>maven-surefire-plugin</artifactId>
  826. <configuration>
  827. <forkCount>${testsThreadCount}</forkCount>
  828. <reuseForks>false</reuseForks>
  829. <argLine>${maven-surefire-plugin.argLine} -DminiClusterDedicatedDirs=true</argLine>
  830. <systemPropertyVariables>
  831. <testsThreadCount>${testsThreadCount}</testsThreadCount>
  832. <test.build.data>${test.build.data}/${surefire.forkNumber}</test.build.data>
  833. <test.build.dir>${test.build.dir}/${surefire.forkNumber}</test.build.dir>
  834. <hadoop.tmp.dir>${hadoop.tmp.dir}/${surefire.forkNumber}</hadoop.tmp.dir>
  835. <!-- Due to a Maven quirk, setting this to just -->
  836. <!-- surefire.forkNumber won't do the parameter substitution. -->
  837. <!-- Putting a prefix in front of it like "fork-" makes it -->
  838. <!-- work. -->
  839. <test.unique.fork.id>fork-${surefire.forkNumber}</test.unique.fork.id>
  840. </systemPropertyVariables>
  841. </configuration>
  842. </plugin>
  843. </plugins>
  844. </build>
  845. </profile>
  846. <profile>
  847. <id>releasedocs</id>
  848. <activation>
  849. <activeByDefault>false</activeByDefault>
  850. </activation>
  851. <build>
  852. <plugins>
  853. <plugin>
  854. <groupId>org.codehaus.mojo</groupId>
  855. <artifactId>exec-maven-plugin</artifactId>
  856. <executions>
  857. <execution>
  858. <id>releasedocs</id>
  859. <phase>pre-site</phase>
  860. <goals>
  861. <goal>exec</goal>
  862. </goals>
  863. <configuration>
  864. <executable>${basedir}/../../dev-support/bin/releasedocmaker</executable>
  865. <requiresOnline>true</requiresOnline>
  866. <arguments>
  867. <argument>--index</argument>
  868. <argument>--license</argument>
  869. <argument>--outputdir</argument>
  870. <argument>${basedir}/src/site/markdown/release</argument>
  871. <argument>--project</argument>
  872. <argument>HADOOP</argument>
  873. <argument>--project</argument>
  874. <argument>HDFS</argument>
  875. <argument>--project</argument>
  876. <argument>MAPREDUCE</argument>
  877. <argument>--project</argument>
  878. <argument>YARN</argument>
  879. <argument>--projecttitle</argument>
  880. <argument>"Apache Hadoop"</argument>
  881. <argument>--usetoday</argument>
  882. <argument>--version</argument>
  883. <argument>${project.version}</argument>
  884. </arguments>
  885. </configuration>
  886. </execution>
  887. </executions>
  888. </plugin>
  889. <plugin>
  890. <artifactId>maven-clean-plugin</artifactId>
  891. <configuration>
  892. <filesets>
  893. <fileset>
  894. <directory>src/site/markdown/release</directory>
  895. <includes>
  896. <include>${project.version}</include>
  897. </includes>
  898. <followSymlinks>false</followSymlinks>
  899. </fileset>
  900. </filesets>
  901. </configuration>
  902. </plugin>
  903. </plugins>
  904. </build>
  905. </profile>
  906. </profiles>
  907. </project>