pom.xml 39 KB

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