pom.xml 42 KB

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