pom.xml 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707
  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-SNAPSHOT</version>
  22. <relativePath>../../hadoop-project-dist</relativePath>
  23. </parent>
  24. <groupId>org.apache.hadoop</groupId>
  25. <artifactId>hadoop-hdfs</artifactId>
  26. <version>3.0.0-SNAPSHOT</version>
  27. <description>Apache Hadoop HDFS</description>
  28. <name>Apache Hadoop HDFS</name>
  29. <packaging>jar</packaging>
  30. <properties>
  31. <hadoop.component>hdfs</hadoop.component>
  32. <kdc.resource.dir>../../hadoop-common-project/hadoop-common/src/test/resources/kdc</kdc.resource.dir>
  33. <is.hadoop.component>true</is.hadoop.component>
  34. <require.fuse>false</require.fuse>
  35. <require.libwebhdfs>false</require.libwebhdfs>
  36. </properties>
  37. <dependencies>
  38. <dependency>
  39. <groupId>org.apache.hadoop</groupId>
  40. <artifactId>hadoop-annotations</artifactId>
  41. <scope>provided</scope>
  42. </dependency>
  43. <dependency>
  44. <groupId>org.apache.hadoop</groupId>
  45. <artifactId>hadoop-auth</artifactId>
  46. <scope>provided</scope>
  47. </dependency>
  48. <dependency>
  49. <groupId>org.apache.hadoop</groupId>
  50. <artifactId>hadoop-common</artifactId>
  51. <scope>provided</scope>
  52. </dependency>
  53. <dependency>
  54. <groupId>org.apache.hadoop</groupId>
  55. <artifactId>hadoop-common</artifactId>
  56. <scope>test</scope>
  57. <type>test-jar</type>
  58. </dependency>
  59. <dependency>
  60. <groupId>org.apache.hadoop</groupId>
  61. <artifactId>hadoop-hdfs-client</artifactId>
  62. <scope>compile</scope>
  63. </dependency>
  64. <dependency>
  65. <groupId>org.apache.zookeeper</groupId>
  66. <artifactId>zookeeper</artifactId>
  67. <type>test-jar</type>
  68. <scope>test</scope>
  69. </dependency>
  70. <dependency>
  71. <groupId>com.google.guava</groupId>
  72. <artifactId>guava</artifactId>
  73. <scope>compile</scope>
  74. </dependency>
  75. <dependency>
  76. <groupId>org.mortbay.jetty</groupId>
  77. <artifactId>jetty</artifactId>
  78. <scope>compile</scope>
  79. </dependency>
  80. <dependency>
  81. <groupId>org.mortbay.jetty</groupId>
  82. <artifactId>jetty-util</artifactId>
  83. <scope>compile</scope>
  84. </dependency>
  85. <dependency>
  86. <groupId>com.sun.jersey</groupId>
  87. <artifactId>jersey-core</artifactId>
  88. <scope>compile</scope>
  89. </dependency>
  90. <dependency>
  91. <groupId>com.sun.jersey</groupId>
  92. <artifactId>jersey-server</artifactId>
  93. <scope>compile</scope>
  94. </dependency>
  95. <dependency>
  96. <groupId>commons-cli</groupId>
  97. <artifactId>commons-cli</artifactId>
  98. <scope>compile</scope>
  99. </dependency>
  100. <dependency>
  101. <groupId>commons-codec</groupId>
  102. <artifactId>commons-codec</artifactId>
  103. <scope>compile</scope>
  104. </dependency>
  105. <dependency>
  106. <groupId>commons-io</groupId>
  107. <artifactId>commons-io</artifactId>
  108. <scope>compile</scope>
  109. </dependency>
  110. <dependency>
  111. <groupId>commons-lang</groupId>
  112. <artifactId>commons-lang</artifactId>
  113. <scope>compile</scope>
  114. </dependency>
  115. <dependency>
  116. <groupId>commons-logging</groupId>
  117. <artifactId>commons-logging</artifactId>
  118. <scope>compile</scope>
  119. </dependency>
  120. <dependency>
  121. <groupId>commons-daemon</groupId>
  122. <artifactId>commons-daemon</artifactId>
  123. <scope>compile</scope>
  124. </dependency>
  125. <dependency>
  126. <groupId>log4j</groupId>
  127. <artifactId>log4j</artifactId>
  128. <scope>compile</scope>
  129. </dependency>
  130. <dependency>
  131. <groupId>com.google.protobuf</groupId>
  132. <artifactId>protobuf-java</artifactId>
  133. <scope>compile</scope>
  134. </dependency>
  135. <dependency>
  136. <groupId>javax.servlet</groupId>
  137. <artifactId>servlet-api</artifactId>
  138. <scope>compile</scope>
  139. </dependency>
  140. <dependency>
  141. <groupId>junit</groupId>
  142. <artifactId>junit</artifactId>
  143. <scope>test</scope>
  144. </dependency>
  145. <dependency>
  146. <groupId>org.apache.hadoop</groupId>
  147. <artifactId>hadoop-minikdc</artifactId>
  148. <scope>test</scope>
  149. </dependency>
  150. <dependency>
  151. <groupId>org.mockito</groupId>
  152. <artifactId>mockito-all</artifactId>
  153. <scope>test</scope>
  154. </dependency>
  155. <dependency>
  156. <groupId>org.slf4j</groupId>
  157. <artifactId>slf4j-log4j12</artifactId>
  158. <scope>provided</scope>
  159. </dependency>
  160. <dependency>
  161. <groupId>org.codehaus.jackson</groupId>
  162. <artifactId>jackson-core-asl</artifactId>
  163. <scope>compile</scope>
  164. </dependency>
  165. <dependency>
  166. <groupId>org.codehaus.jackson</groupId>
  167. <artifactId>jackson-mapper-asl</artifactId>
  168. <scope>compile</scope>
  169. </dependency>
  170. <dependency>
  171. <groupId>xmlenc</groupId>
  172. <artifactId>xmlenc</artifactId>
  173. <scope>compile</scope>
  174. </dependency>
  175. <dependency>
  176. <groupId>io.netty</groupId>
  177. <artifactId>netty-all</artifactId>
  178. <scope>compile</scope>
  179. </dependency>
  180. <dependency>
  181. <groupId>com.twitter</groupId>
  182. <artifactId>hpack</artifactId>
  183. <scope>compile</scope>
  184. </dependency>
  185. <dependency>
  186. <groupId>xerces</groupId>
  187. <artifactId>xercesImpl</artifactId>
  188. <scope>compile</scope>
  189. </dependency>
  190. <dependency>
  191. <groupId>org.apache.htrace</groupId>
  192. <artifactId>htrace-core</artifactId>
  193. </dependency>
  194. <dependency>
  195. <groupId>org.apache.hadoop</groupId>
  196. <artifactId>hadoop-kms</artifactId>
  197. <classifier>classes</classifier>
  198. <type>jar</type>
  199. <scope>test</scope>
  200. </dependency>
  201. <dependency>
  202. <groupId>org.apache.hadoop</groupId>
  203. <artifactId>hadoop-kms</artifactId>
  204. <type>test-jar</type>
  205. <scope>test</scope>
  206. </dependency>
  207. <dependency>
  208. <groupId>org.fusesource.leveldbjni</groupId>
  209. <artifactId>leveldbjni-all</artifactId>
  210. <version>1.8</version>
  211. </dependency>
  212. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  213. <dependency>
  214. <groupId>org.bouncycastle</groupId>
  215. <artifactId>bcprov-jdk16</artifactId>
  216. <scope>test</scope>
  217. </dependency>
  218. </dependencies>
  219. <build>
  220. <plugins>
  221. <plugin>
  222. <groupId>org.apache.maven.plugins</groupId>
  223. <artifactId>maven-surefire-plugin</artifactId>
  224. <configuration>
  225. <systemPropertyVariables>
  226. <startKdc>${startKdc}</startKdc>
  227. <kdc.resource.dir>${kdc.resource.dir}</kdc.resource.dir>
  228. <runningWithNative>${runningWithNative}</runningWithNative>
  229. </systemPropertyVariables>
  230. <properties>
  231. <property>
  232. <name>listener</name>
  233. <value>org.apache.hadoop.test.TimedOutTestsListener</value>
  234. </property>
  235. </properties>
  236. </configuration>
  237. </plugin>
  238. <plugin>
  239. <groupId>org.apache.maven.plugins</groupId>
  240. <artifactId>maven-antrun-plugin</artifactId>
  241. <configuration>
  242. <skipTests>false</skipTests>
  243. </configuration>
  244. <executions>
  245. <execution>
  246. <id>create-web-xmls</id>
  247. <phase>compile</phase>
  248. <goals>
  249. <goal>run</goal>
  250. </goals>
  251. <configuration>
  252. <target>
  253. <copy file="${basedir}/src/main/webapps/proto-web.xml"
  254. tofile="${project.build.directory}/webapps/hdfs/WEB-INF/web.xml"
  255. filtering="true"/>
  256. <copy file="${basedir}/src/main/webapps/proto-web.xml"
  257. tofile="${project.build.directory}/webapps/secondary/WEB-INF/web.xml"
  258. filtering="true"/>
  259. <copy file="${basedir}/src/main/webapps/proto-web.xml"
  260. tofile="${project.build.directory}/webapps/datanode/WEB-INF/web.xml"
  261. filtering="true"/>
  262. <copy file="${basedir}/src/main/webapps/proto-web.xml"
  263. tofile="${project.build.directory}/webapps/journal/WEB-INF/web.xml"
  264. filtering="true"/>
  265. <copy file="${basedir}/src/main/webapps/proto-web.xml"
  266. tofile="${project.build.directory}/webapps/nfs3/WEB-INF/web.xml"
  267. filtering="true"/>
  268. <copy toDir="${project.build.directory}/webapps">
  269. <fileset dir="${basedir}/src/main/webapps">
  270. <exclude name="**/proto-web.xml"/>
  271. </fileset>
  272. </copy>
  273. </target>
  274. </configuration>
  275. </execution>
  276. <execution>
  277. <id>create-log-dir</id>
  278. <phase>process-test-resources</phase>
  279. <goals>
  280. <goal>run</goal>
  281. </goals>
  282. <configuration>
  283. <target>
  284. <delete dir="${test.build.data}"/>
  285. <mkdir dir="${test.build.data}"/>
  286. <mkdir dir="${hadoop.log.dir}"/>
  287. <copy todir="${project.build.directory}/test-classes/webapps">
  288. <fileset dir="${project.build.directory}/webapps">
  289. <exclude name="proto-*-web.xml"/>
  290. <exclude name="**/proto-web.xml"/>
  291. </fileset>
  292. </copy>
  293. </target>
  294. </configuration>
  295. </execution>
  296. <execution>
  297. <phase>pre-site</phase>
  298. <goals>
  299. <goal>run</goal>
  300. </goals>
  301. <configuration>
  302. <tasks>
  303. <copy file="src/main/resources/hdfs-default.xml" todir="src/site/resources"/>
  304. <copy file="src/main/xsl/configuration.xsl" todir="src/site/resources"/>
  305. </tasks>
  306. </configuration>
  307. </execution>
  308. </executions>
  309. </plugin>
  310. <plugin>
  311. <groupId>org.apache.hadoop</groupId>
  312. <artifactId>hadoop-maven-plugins</artifactId>
  313. <executions>
  314. <execution>
  315. <id>compile-protoc</id>
  316. <phase>generate-sources</phase>
  317. <goals>
  318. <goal>protoc</goal>
  319. </goals>
  320. <configuration>
  321. <protocVersion>${protobuf.version}</protocVersion>
  322. <protocCommand>${protoc.path}</protocCommand>
  323. <imports>
  324. <param>${basedir}/../../hadoop-common-project/hadoop-common/src/main/proto</param>
  325. <param>${basedir}/src/main/proto</param>
  326. </imports>
  327. <source>
  328. <directory>${basedir}/src/main/proto</directory>
  329. <includes>
  330. <include>ClientDatanodeProtocol.proto</include>
  331. <include>ClientNamenodeProtocol.proto</include>
  332. <include>DatanodeProtocol.proto</include>
  333. <include>HAZKInfo.proto</include>
  334. <include>InterDatanodeProtocol.proto</include>
  335. <include>JournalProtocol.proto</include>
  336. <include>NamenodeProtocol.proto</include>
  337. <include>QJournalProtocol.proto</include>
  338. <include>acl.proto</include>
  339. <include>xattr.proto</include>
  340. <include>datatransfer.proto</include>
  341. <include>fsimage.proto</include>
  342. <include>hdfs.proto</include>
  343. <include>encryption.proto</include>
  344. <include>inotify.proto</include>
  345. </includes>
  346. </source>
  347. <output>${project.build.directory}/generated-sources/java</output>
  348. </configuration>
  349. </execution>
  350. </executions>
  351. </plugin>
  352. <plugin>
  353. <groupId>org.apache.maven.plugins</groupId>
  354. <artifactId>maven-javadoc-plugin</artifactId>
  355. <configuration>
  356. <excludePackageNames>org.apache.hadoop.hdfs.protocol.proto</excludePackageNames>
  357. </configuration>
  358. </plugin>
  359. <plugin>
  360. <groupId>org.apache.rat</groupId>
  361. <artifactId>apache-rat-plugin</artifactId>
  362. <configuration>
  363. <excludes>
  364. <exclude>CHANGES.txt</exclude>
  365. <exclude>CHANGES.HDFS-1623.txt</exclude>
  366. <exclude>CHANGES.HDFS-347.txt</exclude>
  367. <exclude>.gitattributes</exclude>
  368. <exclude>.idea/**</exclude>
  369. <exclude>src/main/conf/*</exclude>
  370. <exclude>src/main/docs/**</exclude>
  371. <exclude>dev-support/findbugsExcludeFile.xml</exclude>
  372. <exclude>dev-support/checkstyle*</exclude>
  373. <exclude>dev-support/jdiff/**</exclude>
  374. <exclude>dev-support/*tests</exclude>
  375. <exclude>src/main/native/*</exclude>
  376. <exclude>src/main/native/config/*</exclude>
  377. <exclude>src/main/native/m4/*</exclude>
  378. <exclude>src/test/empty-file</exclude>
  379. <exclude>src/test/all-tests</exclude>
  380. <exclude>src/test/resources/*.tgz</exclude>
  381. <exclude>src/test/resources/data*</exclude>
  382. <exclude>src/test/resources/editsStored*</exclude>
  383. <exclude>src/test/resources/empty-file</exclude>
  384. <exclude>src/main/native/util/tree.h</exclude>
  385. <exclude>src/test/aop/org/apache/hadoop/hdfs/server/datanode/DataXceiverAspects.aj</exclude>
  386. <exclude>src/main/webapps/datanode/robots.txt</exclude>
  387. <exclude>src/main/docs/releasenotes.html</exclude>
  388. <exclude>src/contrib/**</exclude>
  389. <exclude>src/site/resources/images/*</exclude>
  390. <exclude>src/main/webapps/static/bootstrap-3.0.2/**</exclude>
  391. <exclude>src/main/webapps/static/dust-full-2.0.0.min.js</exclude>
  392. <exclude>src/main/webapps/static/dust-helpers-1.1.1.min.js</exclude>
  393. <exclude>src/main/webapps/static/jquery-1.10.2.min.js</exclude>
  394. </excludes>
  395. </configuration>
  396. </plugin>
  397. <plugin>
  398. <artifactId>maven-clean-plugin</artifactId>
  399. <configuration>
  400. <filesets>
  401. <fileset>
  402. <directory>src/site/resources</directory>
  403. <includes>
  404. <include>configuration.xsl</include>
  405. <include>hdfs-default.xml</include>
  406. </includes>
  407. <followSymlinks>false</followSymlinks>
  408. </fileset>
  409. </filesets>
  410. </configuration>
  411. </plugin>
  412. </plugins>
  413. </build>
  414. <profiles>
  415. <profile>
  416. <id>native-win</id>
  417. <activation>
  418. <activeByDefault>false</activeByDefault>
  419. <os>
  420. <family>windows</family>
  421. </os>
  422. </activation>
  423. <properties>
  424. <runningWithNative>true</runningWithNative>
  425. </properties>
  426. <build>
  427. <plugins>
  428. <plugin>
  429. <groupId>org.apache.maven.plugins</groupId>
  430. <artifactId>maven-enforcer-plugin</artifactId>
  431. <executions>
  432. <execution>
  433. <id>enforce-os</id>
  434. <goals>
  435. <goal>enforce</goal>
  436. </goals>
  437. <configuration>
  438. <rules>
  439. <requireOS>
  440. <family>windows</family>
  441. <message>native-win build only supported on Windows</message>
  442. </requireOS>
  443. </rules>
  444. <fail>true</fail>
  445. </configuration>
  446. </execution>
  447. </executions>
  448. </plugin>
  449. <plugin>
  450. <groupId>org.apache.maven.plugins</groupId>
  451. <artifactId>maven-antrun-plugin</artifactId>
  452. <executions>
  453. <execution>
  454. <id>make</id>
  455. <phase>compile</phase>
  456. <goals>
  457. <goal>run</goal>
  458. </goals>
  459. <configuration>
  460. <target>
  461. <condition property="generator" value="Visual Studio 10" else="Visual Studio 10 Win64">
  462. <equals arg1="Win32" arg2="${env.PLATFORM}" />
  463. </condition>
  464. <mkdir dir="${project.build.directory}/native"/>
  465. <exec executable="cmake" dir="${project.build.directory}/native"
  466. failonerror="true">
  467. <arg line="${basedir}/src/ -DGENERATED_JAVAH=${project.build.directory}/native/javah -DJVM_ARCH_DATA_MODEL=${sun.arch.data.model} -DREQUIRE_LIBWEBHDFS=${require.libwebhdfs} -DREQUIRE_FUSE=${require.fuse} -G '${generator}'"/>
  468. </exec>
  469. <exec executable="msbuild" dir="${project.build.directory}/native"
  470. failonerror="true">
  471. <arg line="ALL_BUILD.vcxproj /nologo /p:Configuration=RelWithDebInfo /p:LinkIncremental=false"/>
  472. </exec>
  473. <!-- Copy for inclusion in distribution. -->
  474. <copy todir="${project.build.directory}/bin">
  475. <fileset dir="${project.build.directory}/native/target/bin/RelWithDebInfo"/>
  476. </copy>
  477. </target>
  478. </configuration>
  479. </execution>
  480. <execution>
  481. <id>native_tests</id>
  482. <phase>test</phase>
  483. <goals><goal>run</goal></goals>
  484. <configuration>
  485. <skip>${skipTests}</skip>
  486. <target>
  487. <property name="compile_classpath" refid="maven.compile.classpath"/>
  488. <property name="test_classpath" refid="maven.test.classpath"/>
  489. <macrodef name="run-test">
  490. <attribute name="test"/>
  491. <sequential>
  492. <echo message="Running @{test}"/>
  493. <exec executable="${project.build.directory}/native/RelWithDebInfo/@{test}" failonerror="true" dir="${project.build.directory}/native/">
  494. <env key="CLASSPATH" value="${test_classpath}:${compile_classpath}"/>
  495. <!-- HADOOP_HOME required to find winutils. -->
  496. <env key="HADOOP_HOME" value="${hadoop.common.build.dir}"/>
  497. <!-- Make sure hadoop.dll and jvm.dll are on PATH. -->
  498. <env key="PATH" value="${env.PATH};${hadoop.common.build.dir}/bin;${java.home}/jre/bin/server;${java.home}/bin/server"/>
  499. </exec>
  500. <echo message="Finished @{test}"/>
  501. </sequential>
  502. </macrodef>
  503. <run-test test="test_libhdfs_threaded"/>
  504. <echo message="Skipping test_libhdfs_zerocopy"/>
  505. <run-test test="test_native_mini_dfs"/>
  506. </target>
  507. </configuration>
  508. </execution>
  509. </executions>
  510. </plugin>
  511. </plugins>
  512. </build>
  513. </profile>
  514. <profile>
  515. <id>native</id>
  516. <activation>
  517. <activeByDefault>false</activeByDefault>
  518. </activation>
  519. <properties>
  520. <runningWithNative>true</runningWithNative>
  521. </properties>
  522. <build>
  523. <plugins>
  524. <plugin>
  525. <groupId>org.apache.maven.plugins</groupId>
  526. <artifactId>maven-antrun-plugin</artifactId>
  527. <executions>
  528. <execution>
  529. <id>make</id>
  530. <phase>compile</phase>
  531. <goals><goal>run</goal></goals>
  532. <configuration>
  533. <target>
  534. <mkdir dir="${project.build.directory}/native"/>
  535. <exec executable="cmake" dir="${project.build.directory}/native"
  536. failonerror="true">
  537. <arg line="${basedir}/src/ -DGENERATED_JAVAH=${project.build.directory}/native/javah -DJVM_ARCH_DATA_MODEL=${sun.arch.data.model} -DREQUIRE_LIBWEBHDFS=${require.libwebhdfs} -DREQUIRE_FUSE=${require.fuse}"/>
  538. </exec>
  539. <exec executable="make" dir="${project.build.directory}/native" failonerror="true">
  540. <arg line="VERBOSE=1"/>
  541. </exec>
  542. <!-- The second make is a workaround for HADOOP-9215. It can
  543. be removed when version 2.6 of cmake is no longer supported . -->
  544. <exec executable="make" dir="${project.build.directory}/native" failonerror="true"></exec>
  545. </target>
  546. </configuration>
  547. </execution>
  548. <execution>
  549. <id>native_tests</id>
  550. <phase>test</phase>
  551. <goals><goal>run</goal></goals>
  552. <configuration>
  553. <skip>${skipTests}</skip>
  554. <target>
  555. <property name="compile_classpath" refid="maven.compile.classpath"/>
  556. <property name="test_classpath" refid="maven.test.classpath"/>
  557. <macrodef name="run-test">
  558. <attribute name="test"/>
  559. <sequential>
  560. <echo message="Running @{test}"/>
  561. <exec executable="${project.build.directory}/native/@{test}" failonerror="true" dir="${project.build.directory}/native/">
  562. <env key="CLASSPATH" value="${test_classpath}:${compile_classpath}"/>
  563. <!-- Make sure libhadoop.so is on LD_LIBRARY_PATH. -->
  564. <env key="LD_LIBRARY_PATH" value="${env.LD_LIBRARY_PATH}:${project.build.directory}/native/target/usr/local/lib:${hadoop.common.build.dir}/native/target/usr/local/lib"/>
  565. </exec>
  566. <echo message="Finished @{test}"/>
  567. </sequential>
  568. </macrodef>
  569. <run-test test="test_libhdfs_threaded"/>
  570. <run-test test="test_libhdfs_zerocopy"/>
  571. <run-test test="test_native_mini_dfs"/>
  572. </target>
  573. </configuration>
  574. </execution>
  575. </executions>
  576. </plugin>
  577. </plugins>
  578. </build>
  579. </profile>
  580. <!-- profile that starts ApacheDS KDC server -->
  581. <profile>
  582. <id>startKdc</id>
  583. <activation>
  584. <property>
  585. <name>startKdc</name>
  586. <value>true</value>
  587. </property>
  588. </activation>
  589. <build>
  590. <plugins>
  591. <plugin>
  592. <groupId>org.apache.maven.plugins</groupId>
  593. <artifactId>maven-enforcer-plugin</artifactId>
  594. <executions>
  595. <execution>
  596. <id>enforce-os</id>
  597. <goals>
  598. <goal>enforce</goal>
  599. </goals>
  600. <configuration>
  601. <rules>
  602. <!-- At present supports Mac and Unix OS family -->
  603. <requireOS>
  604. <family>mac</family>
  605. <family>unix</family>
  606. </requireOS>
  607. </rules>
  608. <fail>true</fail>
  609. </configuration>
  610. </execution>
  611. </executions>
  612. </plugin>
  613. <plugin>
  614. <groupId>org.apache.maven.plugins</groupId>
  615. <artifactId>maven-antrun-plugin</artifactId>
  616. <executions>
  617. <execution>
  618. <id>kdc</id>
  619. <phase>compile</phase>
  620. <goals>
  621. <goal>run</goal>
  622. </goals>
  623. <configuration>
  624. <target>
  625. <chmod file="${kdc.resource.dir}/killKdc.sh" perm="775" />
  626. <exec dir="${kdc.resource.dir}" executable= "./killKdc.sh" />
  627. <mkdir dir="${project.build.directory}/test-classes/kdc/downloads"/>
  628. <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"/>
  629. <untar src="${project.build.directory}/test-classes/kdc/downloads/apacheds-1.5.7.tar.gz" dest="${project.build.directory}/test-classes/kdc" compression="gzip" />
  630. <copy file="${kdc.resource.dir}/server.xml" toDir="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/conf"/>
  631. <mkdir dir="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/ldif"/>
  632. <copy toDir="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/ldif">
  633. <fileset dir="${kdc.resource.dir}/ldif"/>
  634. </copy>
  635. <chmod file="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/apacheds.sh" perm="775" />
  636. <exec dir="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/" executable="./apacheds.sh" spawn="true"/>
  637. </target>
  638. </configuration>
  639. </execution>
  640. <!-- On completion of graceful test phase: closes the ApacheDS KDC server -->
  641. <execution>
  642. <id>killKdc</id>
  643. <phase>test</phase>
  644. <goals>
  645. <goal>run</goal>
  646. </goals>
  647. <configuration>
  648. <target>
  649. <chmod file="${kdc.resource.dir}/killKdc.sh" perm="775" />
  650. <exec dir="${kdc.resource.dir}" executable= "./killKdc.sh" />
  651. </target>
  652. </configuration>
  653. </execution>
  654. </executions>
  655. </plugin>
  656. </plugins>
  657. </build>
  658. </profile>
  659. <profile>
  660. <id>parallel-tests</id>
  661. <build>
  662. <plugins>
  663. <plugin>
  664. <artifactId>maven-antrun-plugin</artifactId>
  665. <executions>
  666. <execution>
  667. <id>create-parallel-tests-dirs</id>
  668. <phase>test-compile</phase>
  669. <configuration>
  670. <target>
  671. <exec executable="sh">
  672. <arg value="-c"/>
  673. <arg value="for i in {1..${testsThreadCount}}; do mkdir -p ${test.build.data}/$i; mkdir -p ${hadoop.tmp.dir}/$i; done"/>
  674. </exec>
  675. </target>
  676. </configuration>
  677. <goals>
  678. <goal>run</goal>
  679. </goals>
  680. </execution>
  681. </executions>
  682. </plugin>
  683. <plugin>
  684. <groupId>org.apache.maven.plugins</groupId>
  685. <artifactId>maven-surefire-plugin</artifactId>
  686. <configuration>
  687. <forkCount>${testsThreadCount}</forkCount>
  688. <argLine>-Xmx1024m -XX:+HeapDumpOnOutOfMemoryError -DminiClusterDedicatedDirs=true</argLine>
  689. <systemPropertyVariables>
  690. <test.build.data>${test.build.data}/${surefire.forkNumber}</test.build.data>
  691. <hadoop.tmp.dir>${hadoop.tmp.dir}/${surefire.forkNumber}</hadoop.tmp.dir>
  692. </systemPropertyVariables>
  693. </configuration>
  694. </plugin>
  695. </plugins>
  696. </build>
  697. </profile>
  698. </profiles>
  699. </project>