pom.xml 24 KB

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