pom.xml 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977
  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>3.3.0-SNAPSHOT</version>
  22. <relativePath>../../hadoop-project-dist</relativePath>
  23. </parent>
  24. <artifactId>hadoop-common</artifactId>
  25. <version>3.3.0-SNAPSHOT</version>
  26. <description>Apache Hadoop Common</description>
  27. <name>Apache Hadoop Common</name>
  28. <packaging>jar</packaging>
  29. <properties>
  30. <hadoop.component>common</hadoop.component>
  31. <is.hadoop.component>true</is.hadoop.component>
  32. <is.hadoop.common.component>true</is.hadoop.common.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>org.apache.httpcomponents</groupId>
  59. <artifactId>httpclient</artifactId>
  60. <scope>compile</scope>
  61. </dependency>
  62. <dependency>
  63. <groupId>commons-codec</groupId>
  64. <artifactId>commons-codec</artifactId>
  65. <scope>compile</scope>
  66. </dependency>
  67. <dependency>
  68. <groupId>commons-io</groupId>
  69. <artifactId>commons-io</artifactId>
  70. <scope>compile</scope>
  71. </dependency>
  72. <dependency>
  73. <groupId>commons-net</groupId>
  74. <artifactId>commons-net</artifactId>
  75. <scope>compile</scope>
  76. </dependency>
  77. <dependency>
  78. <groupId>commons-collections</groupId>
  79. <artifactId>commons-collections</artifactId>
  80. <scope>compile</scope>
  81. </dependency>
  82. <dependency>
  83. <groupId>javax.servlet</groupId>
  84. <artifactId>javax.servlet-api</artifactId>
  85. <scope>compile</scope>
  86. </dependency>
  87. <dependency>
  88. <groupId>javax.activation</groupId>
  89. <artifactId>javax.activation-api</artifactId>
  90. <scope>runtime</scope>
  91. </dependency>
  92. <dependency>
  93. <groupId>org.eclipse.jetty</groupId>
  94. <artifactId>jetty-server</artifactId>
  95. <scope>compile</scope>
  96. </dependency>
  97. <dependency>
  98. <groupId>org.eclipse.jetty</groupId>
  99. <artifactId>jetty-util</artifactId>
  100. <scope>compile</scope>
  101. </dependency>
  102. <dependency>
  103. <groupId>org.eclipse.jetty</groupId>
  104. <artifactId>jetty-servlet</artifactId>
  105. <scope>compile</scope>
  106. </dependency>
  107. <dependency>
  108. <groupId>org.eclipse.jetty</groupId>
  109. <artifactId>jetty-webapp</artifactId>
  110. <scope>compile</scope>
  111. </dependency>
  112. <dependency>
  113. <groupId>org.eclipse.jetty</groupId>
  114. <artifactId>jetty-util-ajax</artifactId>
  115. <scope>test</scope>
  116. </dependency>
  117. <dependency>
  118. <groupId>javax.servlet.jsp</groupId>
  119. <artifactId>jsp-api</artifactId>
  120. <scope>runtime</scope>
  121. </dependency>
  122. <dependency>
  123. <groupId>com.sun.jersey</groupId>
  124. <artifactId>jersey-core</artifactId>
  125. <scope>compile</scope>
  126. </dependency>
  127. <dependency>
  128. <groupId>com.sun.jersey</groupId>
  129. <artifactId>jersey-servlet</artifactId>
  130. <scope>compile</scope>
  131. </dependency>
  132. <dependency>
  133. <!-- Used, even though 'mvn dependency:analyze' doesn't find it -->
  134. <groupId>com.sun.jersey</groupId>
  135. <artifactId>jersey-json</artifactId>
  136. <scope>compile</scope>
  137. </dependency>
  138. <dependency>
  139. <groupId>com.sun.jersey</groupId>
  140. <artifactId>jersey-server</artifactId>
  141. <scope>compile</scope>
  142. </dependency>
  143. <dependency>
  144. <groupId>commons-logging</groupId>
  145. <artifactId>commons-logging</artifactId>
  146. <scope>compile</scope>
  147. </dependency>
  148. <dependency>
  149. <groupId>log4j</groupId>
  150. <artifactId>log4j</artifactId>
  151. <scope>compile</scope>
  152. </dependency>
  153. <dependency>
  154. <groupId>junit</groupId>
  155. <artifactId>junit</artifactId>
  156. <scope>test</scope>
  157. </dependency>
  158. <dependency>
  159. <groupId>org.assertj</groupId>
  160. <artifactId>assertj-core</artifactId>
  161. <scope>test</scope>
  162. </dependency>
  163. <dependency>
  164. <groupId>org.glassfish.grizzly</groupId>
  165. <artifactId>grizzly-http-servlet</artifactId>
  166. <scope>test</scope>
  167. </dependency>
  168. <dependency>
  169. <groupId>commons-beanutils</groupId>
  170. <artifactId>commons-beanutils</artifactId>
  171. <scope>compile</scope>
  172. </dependency>
  173. <dependency>
  174. <groupId>org.apache.commons</groupId>
  175. <artifactId>commons-configuration2</artifactId>
  176. <scope>compile</scope>
  177. </dependency>
  178. <dependency>
  179. <groupId>org.apache.commons</groupId>
  180. <artifactId>commons-lang3</artifactId>
  181. <scope>compile</scope>
  182. </dependency>
  183. <dependency>
  184. <groupId>org.apache.commons</groupId>
  185. <artifactId>commons-text</artifactId>
  186. <scope>compile</scope>
  187. </dependency>
  188. <dependency>
  189. <groupId>org.slf4j</groupId>
  190. <artifactId>slf4j-api</artifactId>
  191. <scope>compile</scope>
  192. </dependency>
  193. <dependency>
  194. <groupId>org.slf4j</groupId>
  195. <artifactId>slf4j-log4j12</artifactId>
  196. <scope>compile</scope>
  197. </dependency>
  198. <dependency>
  199. <groupId>org.mockito</groupId>
  200. <artifactId>mockito-core</artifactId>
  201. <scope>test</scope>
  202. </dependency>
  203. <dependency>
  204. <groupId>org.apache.avro</groupId>
  205. <artifactId>avro</artifactId>
  206. <scope>compile</scope>
  207. </dependency>
  208. <dependency>
  209. <groupId>org.apache.ant</groupId>
  210. <artifactId>ant</artifactId>
  211. <scope>test</scope>
  212. </dependency>
  213. <dependency>
  214. <groupId>com.google.re2j</groupId>
  215. <artifactId>re2j</artifactId>
  216. <scope>compile</scope>
  217. </dependency>
  218. <dependency>
  219. <groupId>com.google.protobuf</groupId>
  220. <artifactId>protobuf-java</artifactId>
  221. <scope>compile</scope>
  222. </dependency>
  223. <dependency>
  224. <groupId>com.google.code.gson</groupId>
  225. <artifactId>gson</artifactId>
  226. </dependency>
  227. <dependency>
  228. <groupId>org.apache.hadoop</groupId>
  229. <artifactId>hadoop-auth</artifactId>
  230. <scope>compile</scope>
  231. </dependency>
  232. <dependency>
  233. <groupId>org.apache.hadoop</groupId>
  234. <artifactId>hadoop-auth</artifactId>
  235. <type>test-jar</type>
  236. <scope>test</scope>
  237. </dependency>
  238. <dependency>
  239. <groupId>org.apache.hadoop</groupId>
  240. <artifactId>hadoop-minikdc</artifactId>
  241. <scope>test</scope>
  242. </dependency>
  243. <dependency>
  244. <groupId>com.jcraft</groupId>
  245. <artifactId>jsch</artifactId>
  246. </dependency>
  247. <dependency>
  248. <groupId>org.apache.curator</groupId>
  249. <artifactId>curator-test</artifactId>
  250. <scope>test</scope>
  251. </dependency>
  252. <dependency>
  253. <groupId>org.apache.curator</groupId>
  254. <artifactId>curator-client</artifactId>
  255. </dependency>
  256. <dependency>
  257. <groupId>org.apache.curator</groupId>
  258. <artifactId>curator-recipes</artifactId>
  259. </dependency>
  260. <dependency>
  261. <groupId>com.google.code.findbugs</groupId>
  262. <artifactId>jsr305</artifactId>
  263. <scope>compile</scope>
  264. </dependency>
  265. <dependency>
  266. <groupId>org.apache.sshd</groupId>
  267. <artifactId>sshd-core</artifactId>
  268. <scope>test</scope>
  269. </dependency>
  270. <dependency>
  271. <groupId>org.apache.htrace</groupId>
  272. <artifactId>htrace-core4</artifactId>
  273. </dependency>
  274. <dependency>
  275. <groupId>org.apache.zookeeper</groupId>
  276. <artifactId>zookeeper</artifactId>
  277. <exclusions>
  278. <exclusion>
  279. <groupId>org.jboss.netty</groupId>
  280. <artifactId>netty</artifactId>
  281. </exclusion>
  282. <exclusion>
  283. <!-- otherwise seems to drag in junit 3.8.1 via jline -->
  284. <groupId>junit</groupId>
  285. <artifactId>junit</artifactId>
  286. </exclusion>
  287. <exclusion>
  288. <groupId>com.sun.jdmk</groupId>
  289. <artifactId>jmxtools</artifactId>
  290. </exclusion>
  291. <exclusion>
  292. <groupId>com.sun.jmx</groupId>
  293. <artifactId>jmxri</artifactId>
  294. </exclusion>
  295. </exclusions>
  296. </dependency>
  297. <dependency>
  298. <groupId>org.apache.zookeeper</groupId>
  299. <artifactId>zookeeper</artifactId>
  300. <type>test-jar</type>
  301. <scope>test</scope>
  302. </dependency>
  303. <dependency>
  304. <groupId>org.apache.commons</groupId>
  305. <artifactId>commons-compress</artifactId>
  306. </dependency>
  307. <dependency>
  308. <groupId>org.bouncycastle</groupId>
  309. <artifactId>bcprov-jdk15on</artifactId>
  310. <scope>test</scope>
  311. </dependency>
  312. <dependency>
  313. <groupId>org.apache.kerby</groupId>
  314. <artifactId>kerb-core</artifactId>
  315. </dependency>
  316. <dependency>
  317. <groupId>com.fasterxml.jackson.core</groupId>
  318. <artifactId>jackson-databind</artifactId>
  319. </dependency>
  320. <dependency>
  321. <groupId>org.codehaus.woodstox</groupId>
  322. <artifactId>stax2-api</artifactId>
  323. <scope>compile</scope>
  324. </dependency>
  325. <dependency>
  326. <groupId>com.fasterxml.woodstox</groupId>
  327. <artifactId>woodstox-core</artifactId>
  328. <scope>compile</scope>
  329. </dependency>
  330. <dependency>
  331. <groupId>com.squareup.okhttp3</groupId>
  332. <artifactId>mockwebserver</artifactId>
  333. <scope>test</scope>
  334. </dependency>
  335. <dependency>
  336. <groupId>dnsjava</groupId>
  337. <artifactId>dnsjava</artifactId>
  338. <scope>compile</scope>
  339. </dependency>
  340. <dependency>
  341. <groupId>org.wildfly.openssl</groupId>
  342. <artifactId>wildfly-openssl</artifactId>
  343. <scope>provided</scope>
  344. </dependency>
  345. <dependency>
  346. <groupId>org.assertj</groupId>
  347. <artifactId>assertj-core</artifactId>
  348. <scope>test</scope>
  349. </dependency>
  350. </dependencies>
  351. <build>
  352. <!--
  353. Include all files in src/main/resources. By default, do not apply property
  354. substitution (filtering=false), but do apply property substitution to
  355. common-version-info.properties (filtering=true). This will substitute the
  356. version information correctly, but prevent Maven from altering other files
  357. like core-default.xml.
  358. -->
  359. <resources>
  360. <resource>
  361. <directory>${basedir}/src/main/resources</directory>
  362. <excludes>
  363. <exclude>common-version-info.properties</exclude>
  364. </excludes>
  365. <filtering>false</filtering>
  366. </resource>
  367. <resource>
  368. <directory>${basedir}/src/main/resources</directory>
  369. <includes>
  370. <include>common-version-info.properties</include>
  371. </includes>
  372. <filtering>true</filtering>
  373. </resource>
  374. </resources>
  375. <plugins>
  376. <plugin>
  377. <groupId>org.xolstice.maven.plugins</groupId>
  378. <artifactId>protobuf-maven-plugin</artifactId>
  379. <executions>
  380. <execution>
  381. <id>src-compile-protoc</id>
  382. <configuration><skip>false</skip></configuration>
  383. </execution>
  384. <execution>
  385. <id>src-test-compile-protoc</id>
  386. <configuration><skip>false</skip></configuration>
  387. </execution>
  388. </executions>
  389. </plugin>
  390. <plugin>
  391. <groupId>org.apache.hadoop</groupId>
  392. <artifactId>hadoop-maven-plugins</artifactId>
  393. <executions>
  394. <execution>
  395. <id>version-info</id>
  396. <phase>generate-resources</phase>
  397. <goals>
  398. <goal>version-info</goal>
  399. </goals>
  400. <configuration>
  401. <source>
  402. <directory>${basedir}/src/main</directory>
  403. <includes>
  404. <include>java/**/*.java</include>
  405. <include>proto/**/*.proto</include>
  406. </includes>
  407. </source>
  408. </configuration>
  409. </execution>
  410. <execution>
  411. <id>resource-gz</id>
  412. <phase>generate-resources</phase>
  413. <goals>
  414. <goal>resource-gz</goal>
  415. </goals>
  416. <configuration>
  417. <inputDirectory>${basedir}/src/main/webapps/static</inputDirectory>
  418. <outputDirectory>${basedir}/target/webapps/static</outputDirectory>
  419. <extensions>js,css</extensions>
  420. </configuration>
  421. </execution>
  422. </executions>
  423. </plugin>
  424. <plugin>
  425. <groupId>org.apache.maven.plugins</groupId>
  426. <artifactId>maven-surefire-plugin</artifactId>
  427. <configuration>
  428. <systemPropertyVariables>
  429. <runningWithNative>${runningWithNative}</runningWithNative>
  430. </systemPropertyVariables>
  431. <properties>
  432. <property>
  433. <name>listener</name>
  434. <value>org.apache.hadoop.test.TimedOutTestsListener</value>
  435. </property>
  436. </properties>
  437. </configuration>
  438. </plugin>
  439. <plugin>
  440. <groupId>org.apache.avro</groupId>
  441. <artifactId>avro-maven-plugin</artifactId>
  442. <executions>
  443. <execution>
  444. <id>generate-avro-test-sources</id>
  445. <phase>generate-test-sources</phase>
  446. <goals>
  447. <goal>schema</goal>
  448. </goals>
  449. </execution>
  450. </executions>
  451. <configuration>
  452. <testOutputDirectory>${project.build.directory}/generated-test-sources/java</testOutputDirectory>
  453. </configuration>
  454. </plugin>
  455. <plugin>
  456. <groupId>org.apache.maven.plugins</groupId>
  457. <artifactId>maven-antrun-plugin</artifactId>
  458. <executions>
  459. <execution>
  460. <id>create-log-dir</id>
  461. <phase>process-test-resources</phase>
  462. <goals>
  463. <goal>run</goal>
  464. </goals>
  465. <configuration>
  466. <target>
  467. <!--
  468. TODO: there are tests (TestLocalFileSystem#testCopy) that fail if data
  469. TODO: from a previous run is present
  470. -->
  471. <delete dir="${test.build.data}"/>
  472. <mkdir dir="${test.build.data}"/>
  473. <mkdir dir="${hadoop.log.dir}"/>
  474. <copy toDir="${project.build.directory}/test-classes">
  475. <fileset dir="${basedir}/src/main/conf"/>
  476. </copy>
  477. </target>
  478. </configuration>
  479. </execution>
  480. <execution>
  481. <phase>pre-site</phase>
  482. <goals>
  483. <goal>run</goal>
  484. </goals>
  485. <configuration>
  486. <target>
  487. <copy file="src/main/resources/core-default.xml" todir="src/site/resources"/>
  488. <copy file="src/main/xsl/configuration.xsl" todir="src/site/resources"/>
  489. </target>
  490. </configuration>
  491. </execution>
  492. </executions>
  493. </plugin>
  494. <plugin>
  495. <groupId>org.apache.rat</groupId>
  496. <artifactId>apache-rat-plugin</artifactId>
  497. <configuration>
  498. <excludes>
  499. <exclude>.idea/**</exclude>
  500. <exclude>src/main/conf/*</exclude>
  501. <exclude>dev-support/jdiff/**</exclude>
  502. <exclude>src/main/native/*</exclude>
  503. <exclude>src/main/native/config/*</exclude>
  504. <exclude>src/main/native/m4/*</exclude>
  505. <exclude>src/test/empty-file</exclude>
  506. <exclude>src/test/all-tests</exclude>
  507. <exclude>src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4.h</exclude>
  508. <exclude>src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4.c</exclude>
  509. <exclude>src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4hc.h</exclude>
  510. <exclude>src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4hc.c</exclude>
  511. <exclude>src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4hc_encoder.h</exclude>
  512. <exclude>src/main/native/gtest/**/*</exclude>
  513. <exclude>src/test/resources/test-untar.tgz</exclude>
  514. <exclude>src/test/resources/test.har/_SUCCESS</exclude>
  515. <exclude>src/test/resources/test.har/_index</exclude>
  516. <exclude>src/test/resources/test.har/_masterindex</exclude>
  517. <exclude>src/test/resources/test.har/part-0</exclude>
  518. <exclude>src/test/resources/javakeystoreprovider.password</exclude>
  519. <exclude>dev-support/jdiff-workaround.patch</exclude>
  520. </excludes>
  521. </configuration>
  522. </plugin>
  523. <plugin>
  524. <groupId>org.codehaus.mojo</groupId>
  525. <artifactId>exec-maven-plugin</artifactId>
  526. <executions>
  527. <execution>
  528. <id>shelldocs</id>
  529. <phase>pre-site</phase>
  530. <goals>
  531. <goal>exec</goal>
  532. </goals>
  533. <configuration>
  534. <executable>${basedir}/../../dev-support/bin/shelldocs</executable>
  535. <workingDirectory>src/site/markdown</workingDirectory>
  536. <arguments>
  537. <argument>--skipprnorep</argument>
  538. <argument>--output</argument>
  539. <argument>${basedir}/src/site/markdown/UnixShellAPI.md</argument>
  540. <argument>--input</argument>
  541. <argument>${basedir}/src/main/bin/hadoop-functions.sh</argument>
  542. </arguments>
  543. </configuration>
  544. </execution>
  545. </executions>
  546. </plugin>
  547. <plugin>
  548. <artifactId>maven-clean-plugin</artifactId>
  549. <configuration>
  550. <filesets>
  551. <fileset>
  552. <directory>src/site/markdown</directory>
  553. <includes>
  554. <include>UnixShellAPI.md</include>
  555. </includes>
  556. <followSymlinks>false</followSymlinks>
  557. </fileset>
  558. <fileset>
  559. <directory>src/site/resources</directory>
  560. <includes>
  561. <include>configuration.xsl</include>
  562. <include>core-default.xml</include>
  563. </includes>
  564. <followSymlinks>false</followSymlinks>
  565. </fileset>
  566. </filesets>
  567. </configuration>
  568. </plugin>
  569. </plugins>
  570. </build>
  571. <profiles>
  572. <profile>
  573. <id>native</id>
  574. <activation>
  575. <activeByDefault>false</activeByDefault>
  576. </activation>
  577. <properties>
  578. <require.bzip2>false</require.bzip2>
  579. <snappy.prefix></snappy.prefix>
  580. <snappy.lib></snappy.lib>
  581. <snappy.include></snappy.include>
  582. <require.snappy>false</require.snappy>
  583. <zstd.prefix></zstd.prefix>
  584. <zstd.lib></zstd.lib>
  585. <zstd.include></zstd.include>
  586. <require.zstd>false</require.zstd>
  587. <openssl.prefix></openssl.prefix>
  588. <openssl.lib></openssl.lib>
  589. <openssl.include></openssl.include>
  590. <require.isal>false</require.isal>
  591. <isal.prefix></isal.prefix>
  592. <isal.lib></isal.lib>
  593. <require.openssl>false</require.openssl>
  594. <runningWithNative>true</runningWithNative>
  595. <bundle.openssl.in.bin>false</bundle.openssl.in.bin>
  596. <extra.libhadoop.rpath></extra.libhadoop.rpath>
  597. </properties>
  598. <build>
  599. <plugins>
  600. <plugin>
  601. <groupId>org.apache.maven.plugins</groupId>
  602. <artifactId>maven-enforcer-plugin</artifactId>
  603. <executions>
  604. <execution>
  605. <id>enforce-os</id>
  606. <goals>
  607. <goal>enforce</goal>
  608. </goals>
  609. <configuration>
  610. <rules>
  611. <requireOS>
  612. <family>mac</family>
  613. <family>unix</family>
  614. <message>native build only supported on Mac or Unix</message>
  615. </requireOS>
  616. </rules>
  617. <fail>true</fail>
  618. </configuration>
  619. </execution>
  620. </executions>
  621. </plugin>
  622. <plugin>
  623. <groupId>org.apache.hadoop</groupId>
  624. <artifactId>hadoop-maven-plugins</artifactId>
  625. <executions>
  626. <execution>
  627. <id>cmake-compile</id>
  628. <phase>compile</phase>
  629. <goals><goal>cmake-compile</goal></goals>
  630. <configuration>
  631. <source>${basedir}/src</source>
  632. <vars>
  633. <GENERATED_JAVAH>${project.build.directory}/native/javah</GENERATED_JAVAH>
  634. <JVM_ARCH_DATA_MODEL>${sun.arch.data.model}</JVM_ARCH_DATA_MODEL>
  635. <REQUIRE_BZIP2>${require.bzip2}</REQUIRE_BZIP2>
  636. <REQUIRE_SNAPPY>${require.snappy}</REQUIRE_SNAPPY>
  637. <REQUIRE_ZSTD>${require.zstd}</REQUIRE_ZSTD>
  638. <CUSTOM_SNAPPY_PREFIX>${snappy.prefix}</CUSTOM_SNAPPY_PREFIX>
  639. <CUSTOM_SNAPPY_LIB>${snappy.lib} </CUSTOM_SNAPPY_LIB>
  640. <CUSTOM_SNAPPY_INCLUDE>${snappy.include} </CUSTOM_SNAPPY_INCLUDE>
  641. <CUSTOM_ZSTD_PREFIX>${zstd.prefix}</CUSTOM_ZSTD_PREFIX>
  642. <CUSTOM_ZSTD_LIB>${zstd.lib} </CUSTOM_ZSTD_LIB>
  643. <CUSTOM_ZSTD_INCLUDE>${zstd.include} </CUSTOM_ZSTD_INCLUDE>
  644. <REQUIRE_ISAL>${require.isal} </REQUIRE_ISAL>
  645. <CUSTOM_ISAL_PREFIX>${isal.prefix} </CUSTOM_ISAL_PREFIX>
  646. <CUSTOM_ISAL_LIB>${isal.lib} </CUSTOM_ISAL_LIB>
  647. <REQUIRE_PMDK>${require.pmdk}</REQUIRE_PMDK>
  648. <CUSTOM_PMDK_LIB>${pmdk.lib}</CUSTOM_PMDK_LIB>
  649. <REQUIRE_OPENSSL>${require.openssl} </REQUIRE_OPENSSL>
  650. <CUSTOM_OPENSSL_PREFIX>${openssl.prefix} </CUSTOM_OPENSSL_PREFIX>
  651. <CUSTOM_OPENSSL_LIB>${openssl.lib} </CUSTOM_OPENSSL_LIB>
  652. <CUSTOM_OPENSSL_INCLUDE>${openssl.include} </CUSTOM_OPENSSL_INCLUDE>
  653. <EXTRA_LIBHADOOP_RPATH>${extra.libhadoop.rpath}</EXTRA_LIBHADOOP_RPATH>
  654. </vars>
  655. </configuration>
  656. </execution>
  657. <execution>
  658. <id>test_bulk_crc32</id>
  659. <goals><goal>cmake-test</goal></goals>
  660. <phase>test</phase>
  661. <configuration>
  662. <binary>${project.build.directory}/native/test_bulk_crc32</binary>
  663. <timeout>1200</timeout>
  664. <results>${project.build.directory}/native-results</results>
  665. </configuration>
  666. </execution>
  667. <execution>
  668. <id>erasure_code_test</id>
  669. <goals><goal>cmake-test</goal></goals>
  670. <phase>test</phase>
  671. <configuration>
  672. <binary>${project.build.directory}/native/erasure_code_test</binary>
  673. <timeout>300</timeout>
  674. <results>${project.build.directory}/native-results</results>
  675. <skipIfMissing>true</skipIfMissing>
  676. <env>
  677. <LD_LIBRARY_PATH>${LD_LIBRARY_PATH}:${isal.lib}:${isal.prefix}:/usr/lib</LD_LIBRARY_PATH>
  678. </env>
  679. </configuration>
  680. </execution>
  681. </executions>
  682. </plugin>
  683. </plugins>
  684. </build>
  685. </profile>
  686. <profile>
  687. <id>native-win</id>
  688. <activation>
  689. <os>
  690. <family>Windows</family>
  691. </os>
  692. </activation>
  693. <properties>
  694. <snappy.prefix></snappy.prefix>
  695. <snappy.lib></snappy.lib>
  696. <snappy.include></snappy.include>
  697. <require.isal>false</require.isal>
  698. <isal.prefix></isal.prefix>
  699. <isal.lib></isal.lib>
  700. <require.snappy>false</require.snappy>
  701. <bundle.snappy.in.bin>true</bundle.snappy.in.bin>
  702. <zstd.prefix></zstd.prefix>
  703. <zstd.lib></zstd.lib>
  704. <zstd.include></zstd.include>
  705. <require.zstd>false</require.zstd>
  706. <bundle.zstd.in.bin>true</bundle.zstd.in.bin>
  707. <openssl.prefix></openssl.prefix>
  708. <openssl.lib></openssl.lib>
  709. <openssl.include></openssl.include>
  710. <require.openssl>false</require.openssl>
  711. <runningWithNative>true</runningWithNative>
  712. <bundle.openssl.in.bin>false</bundle.openssl.in.bin>
  713. </properties>
  714. <build>
  715. <plugins>
  716. <plugin>
  717. <groupId>org.apache.maven.plugins</groupId>
  718. <artifactId>maven-enforcer-plugin</artifactId>
  719. <executions>
  720. <execution>
  721. <id>enforce-os</id>
  722. <goals>
  723. <goal>enforce</goal>
  724. </goals>
  725. <configuration>
  726. <rules>
  727. <requireOS>
  728. <family>windows</family>
  729. <message>native-win build only supported on Windows</message>
  730. </requireOS>
  731. </rules>
  732. <fail>true</fail>
  733. </configuration>
  734. </execution>
  735. </executions>
  736. </plugin>
  737. <plugin>
  738. <groupId>org.codehaus.mojo</groupId>
  739. <artifactId>exec-maven-plugin</artifactId>
  740. <executions>
  741. <execution>
  742. <id>convert-ms-winutils</id>
  743. <phase>generate-sources</phase>
  744. <goals>
  745. <goal>exec</goal>
  746. </goals>
  747. <configuration>
  748. <executable>${basedir}\..\..\dev-support\bin\win-vs-upgrade.cmd</executable>
  749. <arguments>
  750. <argument>${basedir}\src\main\winutils</argument>
  751. <argument>${project.build.directory}</argument>
  752. </arguments>
  753. </configuration>
  754. </execution>
  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>convert-ms-native-dll</id>
  776. <phase>generate-sources</phase>
  777. <goals>
  778. <goal>exec</goal>
  779. </goals>
  780. <configuration>
  781. <executable>${basedir}\..\..\dev-support\bin\win-vs-upgrade.cmd</executable>
  782. <arguments>
  783. <argument>${basedir}\src\main\native</argument>
  784. <argument>${project.build.directory}</argument>
  785. </arguments>
  786. </configuration>
  787. </execution>
  788. <execution>
  789. <id>compile-ms-native-dll</id>
  790. <phase>compile</phase>
  791. <goals>
  792. <goal>exec</goal>
  793. </goals>
  794. <configuration>
  795. <executable>msbuild</executable>
  796. <arguments>
  797. <argument>${basedir}/src/main/native/native.sln</argument>
  798. <argument>/nologo</argument>
  799. <argument>/p:Configuration=Release</argument>
  800. <argument>/p:OutDir=${project.build.directory}/bin/</argument>
  801. <argument>/p:CustomSnappyPrefix=${snappy.prefix}</argument>
  802. <argument>/p:CustomSnappyLib=${snappy.lib}</argument>
  803. <argument>/p:CustomSnappyInclude=${snappy.include}</argument>
  804. <argument>/p:RequireSnappy=${require.snappy}</argument>
  805. <argument>/p:CustomZstdPrefix=${zstd.prefix}</argument>
  806. <argument>/p:CustomZstdLib=${zstd.lib}</argument>
  807. <argument>/p:CustomZstdInclude=${zstd.include}</argument>
  808. <argument>/p:RequireZstd=${require.zstd}</argument>
  809. <argument>/p:CustomOpensslPrefix=${openssl.prefix}</argument>
  810. <argument>/p:CustomOpensslLib=${openssl.lib}</argument>
  811. <argument>/p:CustomOpensslInclude=${openssl.include}</argument>
  812. <argument>/p:RequireOpenssl=${require.openssl}</argument>
  813. <argument>/p:RequireIsal=${require.isal}</argument>
  814. <argument>/p:CustomIsalPrefix=${isal.prefix}</argument>
  815. <argument>/p:CustomIsalLib=${isal.lib}</argument>
  816. </arguments>
  817. </configuration>
  818. </execution>
  819. </executions>
  820. </plugin>
  821. </plugins>
  822. </build>
  823. </profile>
  824. <profile>
  825. <id>parallel-tests</id>
  826. <build>
  827. <plugins>
  828. <plugin>
  829. <groupId>org.apache.hadoop</groupId>
  830. <artifactId>hadoop-maven-plugins</artifactId>
  831. <executions>
  832. <execution>
  833. <id>parallel-tests-createdir</id>
  834. <goals>
  835. <goal>parallel-tests-createdir</goal>
  836. </goals>
  837. </execution>
  838. </executions>
  839. </plugin>
  840. <plugin>
  841. <groupId>org.apache.maven.plugins</groupId>
  842. <artifactId>maven-surefire-plugin</artifactId>
  843. <configuration>
  844. <forkCount>${testsThreadCount}</forkCount>
  845. <reuseForks>false</reuseForks>
  846. <argLine>${maven-surefire-plugin.argLine} -DminiClusterDedicatedDirs=true</argLine>
  847. <systemPropertyVariables>
  848. <testsThreadCount>${testsThreadCount}</testsThreadCount>
  849. <test.build.data>${test.build.data}/${surefire.forkNumber}</test.build.data>
  850. <test.build.dir>${test.build.dir}/${surefire.forkNumber}</test.build.dir>
  851. <hadoop.tmp.dir>${hadoop.tmp.dir}/${surefire.forkNumber}</hadoop.tmp.dir>
  852. <!-- Due to a Maven quirk, setting this to just -->
  853. <!-- surefire.forkNumber won't do the parameter substitution. -->
  854. <!-- Putting a prefix in front of it like "fork-" makes it -->
  855. <!-- work. -->
  856. <test.unique.fork.id>fork-${surefire.forkNumber}</test.unique.fork.id>
  857. </systemPropertyVariables>
  858. </configuration>
  859. </plugin>
  860. </plugins>
  861. </build>
  862. </profile>
  863. <profile>
  864. <id>releasedocs</id>
  865. <activation>
  866. <activeByDefault>false</activeByDefault>
  867. </activation>
  868. <build>
  869. <plugins>
  870. <plugin>
  871. <groupId>org.codehaus.mojo</groupId>
  872. <artifactId>exec-maven-plugin</artifactId>
  873. <executions>
  874. <execution>
  875. <id>releasedocs</id>
  876. <phase>pre-site</phase>
  877. <goals>
  878. <goal>exec</goal>
  879. </goals>
  880. <configuration>
  881. <executable>${basedir}/../../dev-support/bin/releasedocmaker</executable>
  882. <requiresOnline>true</requiresOnline>
  883. <arguments>
  884. <argument>--index</argument>
  885. <argument>--license</argument>
  886. <argument>--outputdir</argument>
  887. <argument>${basedir}/src/site/markdown/release</argument>
  888. <argument>--project</argument>
  889. <argument>HADOOP</argument>
  890. <argument>--project</argument>
  891. <argument>HDFS</argument>
  892. <argument>--project</argument>
  893. <argument>MAPREDUCE</argument>
  894. <argument>--project</argument>
  895. <argument>YARN</argument>
  896. <argument>--projecttitle</argument>
  897. <argument>Apache Hadoop</argument>
  898. <argument>--usetoday</argument>
  899. <argument>--fileversions</argument>
  900. <argument>--dirversions</argument>
  901. <argument>--version</argument>
  902. <argument>${project.version}</argument>
  903. </arguments>
  904. </configuration>
  905. </execution>
  906. </executions>
  907. </plugin>
  908. <plugin>
  909. <artifactId>maven-clean-plugin</artifactId>
  910. <configuration>
  911. <filesets>
  912. <fileset>
  913. <directory>src/site/markdown/release</directory>
  914. <includes>
  915. <include>${project.version}/</include>
  916. <include>index.md</include>
  917. </includes>
  918. <followSymlinks>false</followSymlinks>
  919. </fileset>
  920. </filesets>
  921. </configuration>
  922. </plugin>
  923. </plugins>
  924. </build>
  925. </profile>
  926. <!-- profile to test shell code -->
  927. <profile>
  928. <id>shelltest</id>
  929. <activation>
  930. <property>
  931. <name>!skipTests</name>
  932. </property>
  933. </activation>
  934. <build>
  935. <plugins>
  936. <plugin>
  937. <artifactId>maven-antrun-plugin</artifactId>
  938. <executions>
  939. <execution>
  940. <id>common-test-bats-driver</id>
  941. <phase>test</phase>
  942. <goals>
  943. <goal>run</goal>
  944. </goals>
  945. <configuration>
  946. <target>
  947. <exec dir="src/test/scripts"
  948. executable="bash"
  949. failonerror="true">
  950. <arg value="./run-bats.sh" />
  951. </exec>
  952. </target>
  953. </configuration>
  954. </execution>
  955. </executions>
  956. </plugin>
  957. </plugins>
  958. </build>
  959. </profile>
  960. </profiles>
  961. </project>