pom.xml 41 KB

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