pom.xml 42 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079
  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. http://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.0.4-SNAPSHOT</version>
  22. <relativePath>../../hadoop-project-dist</relativePath>
  23. </parent>
  24. <artifactId>hadoop-common</artifactId>
  25. <version>3.0.4-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_OPENSSL>${require.openssl} </REQUIRE_OPENSSL>
  664. <CUSTOM_OPENSSL_PREFIX>${openssl.prefix} </CUSTOM_OPENSSL_PREFIX>
  665. <CUSTOM_OPENSSL_LIB>${openssl.lib} </CUSTOM_OPENSSL_LIB>
  666. <CUSTOM_OPENSSL_INCLUDE>${openssl.include} </CUSTOM_OPENSSL_INCLUDE>
  667. <EXTRA_LIBHADOOP_RPATH>${extra.libhadoop.rpath}</EXTRA_LIBHADOOP_RPATH>
  668. </vars>
  669. </configuration>
  670. </execution>
  671. <execution>
  672. <id>test_bulk_crc32</id>
  673. <goals><goal>cmake-test</goal></goals>
  674. <phase>test</phase>
  675. <configuration>
  676. <binary>${project.build.directory}/native/test_bulk_crc32</binary>
  677. <timeout>1200</timeout>
  678. <results>${project.build.directory}/native-results</results>
  679. </configuration>
  680. </execution>
  681. <execution>
  682. <id>erasure_code_test</id>
  683. <goals><goal>cmake-test</goal></goals>
  684. <phase>test</phase>
  685. <configuration>
  686. <binary>${project.build.directory}/native/erasure_code_test</binary>
  687. <timeout>300</timeout>
  688. <results>${project.build.directory}/native-results</results>
  689. <skipIfMissing>true</skipIfMissing>
  690. <env>
  691. <LD_LIBRARY_PATH>${LD_LIBRARY_PATH}:${isal.lib}:${isal.prefix}:/usr/lib</LD_LIBRARY_PATH>
  692. </env>
  693. </configuration>
  694. </execution>
  695. </executions>
  696. </plugin>
  697. </plugins>
  698. </build>
  699. </profile>
  700. <profile>
  701. <id>native-win</id>
  702. <activation>
  703. <os>
  704. <family>Windows</family>
  705. </os>
  706. </activation>
  707. <properties>
  708. <snappy.prefix></snappy.prefix>
  709. <snappy.lib></snappy.lib>
  710. <snappy.include></snappy.include>
  711. <require.isal>false</require.isal>
  712. <isal.prefix></isal.prefix>
  713. <isal.lib></isal.lib>
  714. <require.snappy>false</require.snappy>
  715. <bundle.snappy.in.bin>true</bundle.snappy.in.bin>
  716. <zstd.prefix></zstd.prefix>
  717. <zstd.lib></zstd.lib>
  718. <zstd.include></zstd.include>
  719. <require.zstd>false</require.zstd>
  720. <bundle.zstd.in.bin>true</bundle.zstd.in.bin>
  721. <openssl.prefix></openssl.prefix>
  722. <openssl.lib></openssl.lib>
  723. <openssl.include></openssl.include>
  724. <require.openssl>false</require.openssl>
  725. <runningWithNative>true</runningWithNative>
  726. <bundle.openssl.in.bin>false</bundle.openssl.in.bin>
  727. </properties>
  728. <build>
  729. <plugins>
  730. <plugin>
  731. <groupId>org.apache.maven.plugins</groupId>
  732. <artifactId>maven-enforcer-plugin</artifactId>
  733. <executions>
  734. <execution>
  735. <id>enforce-os</id>
  736. <goals>
  737. <goal>enforce</goal>
  738. </goals>
  739. <configuration>
  740. <rules>
  741. <requireOS>
  742. <family>windows</family>
  743. <message>native-win build only supported on Windows</message>
  744. </requireOS>
  745. </rules>
  746. <fail>true</fail>
  747. </configuration>
  748. </execution>
  749. </executions>
  750. </plugin>
  751. <plugin>
  752. <groupId>org.codehaus.mojo</groupId>
  753. <artifactId>native-maven-plugin</artifactId>
  754. <executions>
  755. <execution>
  756. <phase>compile</phase>
  757. <goals>
  758. <goal>javah</goal>
  759. </goals>
  760. <configuration>
  761. <javahPath>${env.JAVA_HOME}/bin/javah</javahPath>
  762. <javahClassNames>
  763. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibCompressor</javahClassName>
  764. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibDecompressor</javahClassName>
  765. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsMapping</javahClassName>
  766. <javahClassName>org.apache.hadoop.io.nativeio.NativeIO</javahClassName>
  767. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsNetgroupMapping</javahClassName>
  768. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyCompressor</javahClassName>
  769. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyDecompressor</javahClassName>
  770. <javahClassName>org.apache.hadoop.io.compress.zstd.ZStandardCompressor</javahClassName>
  771. <javahClassName>org.apache.hadoop.io.compress.zstd.ZStandardDecompressor</javahClassName>
  772. <javahClassName>org.apache.hadoop.io.compress.lz4.Lz4Compressor</javahClassName>
  773. <javahClassName>org.apache.hadoop.io.compress.lz4.Lz4Decompressor</javahClassName>
  774. <javahClassName>org.apache.hadoop.io.erasurecode.ErasureCodeNative</javahClassName>
  775. <javahClassName>org.apache.hadoop.io.erasurecode.rawcoder.NativeRSRawEncoder</javahClassName>
  776. <javahClassName>org.apache.hadoop.io.erasurecode.rawcoder.NativeRSRawDecoder</javahClassName>
  777. <javahClassName>org.apache.hadoop.io.erasurecode.rawcoder.NativeXORRawEncoder</javahClassName>
  778. <javahClassName>org.apache.hadoop.io.erasurecode.rawcoder.NativeXORRawDecoder</javahClassName>
  779. <javahClassName>org.apache.hadoop.crypto.OpensslCipher</javahClassName>
  780. <javahClassName>org.apache.hadoop.crypto.random.OpensslSecureRandom</javahClassName>
  781. <javahClassName>org.apache.hadoop.util.NativeCrc32</javahClassName>
  782. </javahClassNames>
  783. <javahOutputDirectory>${project.build.directory}/native/javah</javahOutputDirectory>
  784. </configuration>
  785. </execution>
  786. </executions>
  787. </plugin>
  788. <plugin>
  789. <groupId>org.codehaus.mojo</groupId>
  790. <artifactId>exec-maven-plugin</artifactId>
  791. <executions>
  792. <execution>
  793. <id>compile-ms-winutils</id>
  794. <phase>compile</phase>
  795. <goals>
  796. <goal>exec</goal>
  797. </goals>
  798. <configuration>
  799. <executable>msbuild</executable>
  800. <arguments>
  801. <argument>${basedir}/src/main/winutils/winutils.sln</argument>
  802. <argument>/nologo</argument>
  803. <argument>/p:Configuration=Release</argument>
  804. <argument>/p:OutDir=${project.build.directory}/bin/</argument>
  805. <argument>/p:IntermediateOutputPath=${project.build.directory}/winutils/</argument>
  806. <argument>/p:WsceConfigDir=${wsce.config.dir}</argument>
  807. <argument>/p:WsceConfigFile=${wsce.config.file}</argument>
  808. </arguments>
  809. </configuration>
  810. </execution>
  811. <execution>
  812. <id>compile-ms-native-dll</id>
  813. <phase>compile</phase>
  814. <goals>
  815. <goal>exec</goal>
  816. </goals>
  817. <configuration>
  818. <executable>msbuild</executable>
  819. <arguments>
  820. <argument>${basedir}/src/main/native/native.sln</argument>
  821. <argument>/nologo</argument>
  822. <argument>/p:Configuration=Release</argument>
  823. <argument>/p:OutDir=${project.build.directory}/bin/</argument>
  824. <argument>/p:CustomSnappyPrefix=${snappy.prefix}</argument>
  825. <argument>/p:CustomSnappyLib=${snappy.lib}</argument>
  826. <argument>/p:CustomSnappyInclude=${snappy.include}</argument>
  827. <argument>/p:RequireSnappy=${require.snappy}</argument>
  828. <argument>/p:CustomZstdPrefix=${zstd.prefix}</argument>
  829. <argument>/p:CustomZstdLib=${zstd.lib}</argument>
  830. <argument>/p:CustomZstdInclude=${zstd.include}</argument>
  831. <argument>/p:RequireZstd=${require.zstd}</argument>
  832. <argument>/p:CustomOpensslPrefix=${openssl.prefix}</argument>
  833. <argument>/p:CustomOpensslLib=${openssl.lib}</argument>
  834. <argument>/p:CustomOpensslInclude=${openssl.include}</argument>
  835. <argument>/p:RequireOpenssl=${require.openssl}</argument>
  836. <argument>/p:RequireIsal=${require.isal}</argument>
  837. <argument>/p:CustomIsalPrefix=${isal.prefix}</argument>
  838. <argument>/p:CustomIsalLib=${isal.lib}</argument>
  839. </arguments>
  840. </configuration>
  841. </execution>
  842. </executions>
  843. </plugin>
  844. </plugins>
  845. </build>
  846. </profile>
  847. <!-- profile that starts ApacheDS KDC server -->
  848. <profile>
  849. <id>startKdc</id>
  850. <activation>
  851. <property>
  852. <name>startKdc</name>
  853. <value>true</value>
  854. </property>
  855. </activation>
  856. <build>
  857. <plugins>
  858. <plugin>
  859. <groupId>org.apache.maven.plugins</groupId>
  860. <artifactId>maven-enforcer-plugin</artifactId>
  861. <executions>
  862. <execution>
  863. <id>enforce-os</id>
  864. <goals>
  865. <goal>enforce</goal>
  866. </goals>
  867. <configuration>
  868. <rules>
  869. <!-- At present supports Mac and Unix OS family -->
  870. <requireOS>
  871. <family>mac</family>
  872. <family>unix</family>
  873. </requireOS>
  874. </rules>
  875. <fail>true</fail>
  876. </configuration>
  877. </execution>
  878. </executions>
  879. </plugin>
  880. <plugin>
  881. <groupId>org.apache.maven.plugins</groupId>
  882. <artifactId>maven-antrun-plugin</artifactId>
  883. <executions>
  884. <execution>
  885. <id>kdc</id>
  886. <phase>compile</phase>
  887. <goals>
  888. <goal>run</goal>
  889. </goals>
  890. <configuration>
  891. <target>
  892. <chmod file="${kdc.resource.dir}/killKdc.sh" perm="775" />
  893. <exec dir="${kdc.resource.dir}" executable= "./killKdc.sh" />
  894. <mkdir dir="${project.build.directory}/test-classes/kdc/downloads"/>
  895. <get src="http://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"/>
  896. <untar src="${project.build.directory}/test-classes/kdc/downloads/apacheds-1.5.7.tar.gz" dest="${project.build.directory}/test-classes/kdc" compression="gzip" />
  897. <copy file="${kdc.resource.dir}/server.xml" toDir="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/conf"/>
  898. <mkdir dir="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/ldif"/>
  899. <copy toDir="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/ldif">
  900. <fileset dir="${kdc.resource.dir}/ldif"/>
  901. </copy>
  902. <chmod file="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/apacheds.sh" perm="775" />
  903. <exec dir="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/" executable="./apacheds.sh" spawn="true"/>
  904. </target>
  905. </configuration>
  906. </execution>
  907. <!-- On completion of graceful test phase: closes the ApacheDS KDC server -->
  908. <execution>
  909. <id>killKdc</id>
  910. <phase>test</phase>
  911. <goals>
  912. <goal>run</goal>
  913. </goals>
  914. <configuration>
  915. <target>
  916. <chmod file="${kdc.resource.dir}/killKdc.sh" perm="775" />
  917. <exec dir="${kdc.resource.dir}" executable= "./killKdc.sh" />
  918. </target>
  919. </configuration>
  920. </execution>
  921. </executions>
  922. </plugin>
  923. </plugins>
  924. </build>
  925. </profile>
  926. <profile>
  927. <id>parallel-tests</id>
  928. <build>
  929. <plugins>
  930. <plugin>
  931. <groupId>org.apache.hadoop</groupId>
  932. <artifactId>hadoop-maven-plugins</artifactId>
  933. <executions>
  934. <execution>
  935. <id>parallel-tests-createdir</id>
  936. <goals>
  937. <goal>parallel-tests-createdir</goal>
  938. </goals>
  939. </execution>
  940. </executions>
  941. </plugin>
  942. <plugin>
  943. <groupId>org.apache.maven.plugins</groupId>
  944. <artifactId>maven-surefire-plugin</artifactId>
  945. <configuration>
  946. <forkCount>${testsThreadCount}</forkCount>
  947. <reuseForks>false</reuseForks>
  948. <argLine>${maven-surefire-plugin.argLine} -DminiClusterDedicatedDirs=true</argLine>
  949. <systemPropertyVariables>
  950. <testsThreadCount>${testsThreadCount}</testsThreadCount>
  951. <test.build.data>${test.build.data}/${surefire.forkNumber}</test.build.data>
  952. <test.build.dir>${test.build.dir}/${surefire.forkNumber}</test.build.dir>
  953. <hadoop.tmp.dir>${hadoop.tmp.dir}/${surefire.forkNumber}</hadoop.tmp.dir>
  954. <!-- Due to a Maven quirk, setting this to just -->
  955. <!-- surefire.forkNumber won't do the parameter substitution. -->
  956. <!-- Putting a prefix in front of it like "fork-" makes it -->
  957. <!-- work. -->
  958. <test.unique.fork.id>fork-${surefire.forkNumber}</test.unique.fork.id>
  959. </systemPropertyVariables>
  960. </configuration>
  961. </plugin>
  962. </plugins>
  963. </build>
  964. </profile>
  965. <profile>
  966. <id>releasedocs</id>
  967. <activation>
  968. <activeByDefault>false</activeByDefault>
  969. </activation>
  970. <build>
  971. <plugins>
  972. <plugin>
  973. <groupId>org.codehaus.mojo</groupId>
  974. <artifactId>exec-maven-plugin</artifactId>
  975. <executions>
  976. <execution>
  977. <id>releasedocs</id>
  978. <phase>pre-site</phase>
  979. <goals>
  980. <goal>exec</goal>
  981. </goals>
  982. <configuration>
  983. <executable>${basedir}/../../dev-support/bin/releasedocmaker</executable>
  984. <requiresOnline>true</requiresOnline>
  985. <arguments>
  986. <argument>--index</argument>
  987. <argument>--license</argument>
  988. <argument>--outputdir</argument>
  989. <argument>${basedir}/src/site/markdown/release</argument>
  990. <argument>--project</argument>
  991. <argument>HADOOP</argument>
  992. <argument>--project</argument>
  993. <argument>HDFS</argument>
  994. <argument>--project</argument>
  995. <argument>MAPREDUCE</argument>
  996. <argument>--project</argument>
  997. <argument>YARN</argument>
  998. <argument>--projecttitle</argument>
  999. <argument>Apache Hadoop</argument>
  1000. <argument>--usetoday</argument>
  1001. <argument>--version</argument>
  1002. <argument>${project.version}</argument>
  1003. </arguments>
  1004. </configuration>
  1005. </execution>
  1006. </executions>
  1007. </plugin>
  1008. <plugin>
  1009. <artifactId>maven-clean-plugin</artifactId>
  1010. <configuration>
  1011. <filesets>
  1012. <fileset>
  1013. <directory>src/site/markdown/release</directory>
  1014. <includes>
  1015. <include>${project.version}/</include>
  1016. <include>index.md</include>
  1017. </includes>
  1018. <followSymlinks>false</followSymlinks>
  1019. </fileset>
  1020. </filesets>
  1021. </configuration>
  1022. </plugin>
  1023. </plugins>
  1024. </build>
  1025. </profile>
  1026. <!-- profile to test shell code -->
  1027. <profile>
  1028. <id>shelltest</id>
  1029. <activation>
  1030. <property>
  1031. <name>!skipTests</name>
  1032. </property>
  1033. </activation>
  1034. <build>
  1035. <plugins>
  1036. <plugin>
  1037. <artifactId>maven-antrun-plugin</artifactId>
  1038. <executions>
  1039. <execution>
  1040. <id>common-test-bats-driver</id>
  1041. <phase>test</phase>
  1042. <goals>
  1043. <goal>run</goal>
  1044. </goals>
  1045. <configuration>
  1046. <target>
  1047. <exec dir="src/test/scripts"
  1048. executable="bash"
  1049. failonerror="true">
  1050. <arg value="./run-bats.sh" />
  1051. </exec>
  1052. </target>
  1053. </configuration>
  1054. </execution>
  1055. </executions>
  1056. </plugin>
  1057. </plugins>
  1058. </build>
  1059. </profile>
  1060. </profiles>
  1061. </project>