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