pom.xml 42 KB

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