pom.xml 44 KB

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