pom.xml 40 KB

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