pom.xml 37 KB

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