pom.xml 47 KB

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