pom.xml 44 KB

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