pom.xml 41 KB

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