pom.xml 35 KB

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