pom.xml 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625
  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. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  212. <dependency>
  213. <groupId>org.bouncycastle</groupId>
  214. <artifactId>bcprov-jdk16</artifactId>
  215. <scope>test</scope>
  216. </dependency>
  217. </dependencies>
  218. <build>
  219. <plugins>
  220. <plugin>
  221. <groupId>org.apache.maven.plugins</groupId>
  222. <artifactId>maven-surefire-plugin</artifactId>
  223. <configuration>
  224. <systemPropertyVariables>
  225. <startKdc>${startKdc}</startKdc>
  226. <kdc.resource.dir>${kdc.resource.dir}</kdc.resource.dir>
  227. <runningWithNative>${runningWithNative}</runningWithNative>
  228. </systemPropertyVariables>
  229. <properties>
  230. <property>
  231. <name>listener</name>
  232. <value>org.apache.hadoop.test.TimedOutTestsListener</value>
  233. </property>
  234. </properties>
  235. </configuration>
  236. </plugin>
  237. <plugin>
  238. <groupId>org.apache.maven.plugins</groupId>
  239. <artifactId>maven-antrun-plugin</artifactId>
  240. <configuration>
  241. <skipTests>false</skipTests>
  242. </configuration>
  243. <executions>
  244. <execution>
  245. <id>create-web-xmls</id>
  246. <phase>compile</phase>
  247. <goals>
  248. <goal>run</goal>
  249. </goals>
  250. <configuration>
  251. <target>
  252. <copy file="${basedir}/src/main/webapps/proto-web.xml"
  253. tofile="${project.build.directory}/webapps/hdfs/WEB-INF/web.xml"
  254. filtering="true"/>
  255. <copy file="${basedir}/src/main/webapps/proto-web.xml"
  256. tofile="${project.build.directory}/webapps/secondary/WEB-INF/web.xml"
  257. filtering="true"/>
  258. <copy file="${basedir}/src/main/webapps/proto-web.xml"
  259. tofile="${project.build.directory}/webapps/datanode/WEB-INF/web.xml"
  260. filtering="true"/>
  261. <copy file="${basedir}/src/main/webapps/proto-web.xml"
  262. tofile="${project.build.directory}/webapps/journal/WEB-INF/web.xml"
  263. filtering="true"/>
  264. <copy file="${basedir}/src/main/webapps/proto-web.xml"
  265. tofile="${project.build.directory}/webapps/nfs3/WEB-INF/web.xml"
  266. filtering="true"/>
  267. <copy toDir="${project.build.directory}/webapps">
  268. <fileset dir="${basedir}/src/main/webapps">
  269. <exclude name="**/proto-web.xml"/>
  270. </fileset>
  271. </copy>
  272. </target>
  273. </configuration>
  274. </execution>
  275. <execution>
  276. <id>create-log-dir</id>
  277. <phase>process-test-resources</phase>
  278. <goals>
  279. <goal>run</goal>
  280. </goals>
  281. <configuration>
  282. <target>
  283. <delete dir="${test.build.data}"/>
  284. <mkdir dir="${test.build.data}"/>
  285. <mkdir dir="${hadoop.log.dir}"/>
  286. <copy todir="${project.build.directory}/test-classes/webapps">
  287. <fileset dir="${project.build.directory}/webapps">
  288. <exclude name="proto-*-web.xml"/>
  289. <exclude name="**/proto-web.xml"/>
  290. </fileset>
  291. </copy>
  292. </target>
  293. </configuration>
  294. </execution>
  295. <execution>
  296. <phase>pre-site</phase>
  297. <goals>
  298. <goal>run</goal>
  299. </goals>
  300. <configuration>
  301. <tasks>
  302. <copy file="src/main/resources/hdfs-default.xml" todir="src/site/resources"/>
  303. <copy file="src/main/xsl/configuration.xsl" todir="src/site/resources"/>
  304. </tasks>
  305. </configuration>
  306. </execution>
  307. </executions>
  308. </plugin>
  309. <plugin>
  310. <groupId>org.apache.hadoop</groupId>
  311. <artifactId>hadoop-maven-plugins</artifactId>
  312. <executions>
  313. <execution>
  314. <id>compile-protoc</id>
  315. <phase>generate-sources</phase>
  316. <goals>
  317. <goal>protoc</goal>
  318. </goals>
  319. <configuration>
  320. <protocVersion>${protobuf.version}</protocVersion>
  321. <protocCommand>${protoc.path}</protocCommand>
  322. <imports>
  323. <param>${basedir}/../../hadoop-common-project/hadoop-common/src/main/proto</param>
  324. <param>${basedir}/src/main/proto</param>
  325. </imports>
  326. <source>
  327. <directory>${basedir}/src/main/proto</directory>
  328. <includes>
  329. <include>ClientDatanodeProtocol.proto</include>
  330. <include>ClientNamenodeProtocol.proto</include>
  331. <include>DatanodeProtocol.proto</include>
  332. <include>HAZKInfo.proto</include>
  333. <include>InterDatanodeProtocol.proto</include>
  334. <include>JournalProtocol.proto</include>
  335. <include>NamenodeProtocol.proto</include>
  336. <include>QJournalProtocol.proto</include>
  337. <include>acl.proto</include>
  338. <include>xattr.proto</include>
  339. <include>datatransfer.proto</include>
  340. <include>fsimage.proto</include>
  341. <include>hdfs.proto</include>
  342. <include>encryption.proto</include>
  343. <include>inotify.proto</include>
  344. </includes>
  345. </source>
  346. <output>${project.build.directory}/generated-sources/java</output>
  347. </configuration>
  348. </execution>
  349. </executions>
  350. </plugin>
  351. <plugin>
  352. <groupId>org.apache.maven.plugins</groupId>
  353. <artifactId>maven-javadoc-plugin</artifactId>
  354. <configuration>
  355. <excludePackageNames>org.apache.hadoop.hdfs.protocol.proto</excludePackageNames>
  356. </configuration>
  357. </plugin>
  358. <plugin>
  359. <groupId>org.apache.rat</groupId>
  360. <artifactId>apache-rat-plugin</artifactId>
  361. <configuration>
  362. <excludes>
  363. <exclude>CHANGES.txt</exclude>
  364. <exclude>CHANGES.HDFS-1623.txt</exclude>
  365. <exclude>.gitattributes</exclude>
  366. <exclude>.idea/**</exclude>
  367. <exclude>src/main/conf/*</exclude>
  368. <exclude>src/main/docs/**</exclude>
  369. <exclude>dev-support/findbugsExcludeFile.xml</exclude>
  370. <exclude>dev-support/checkstyle*</exclude>
  371. <exclude>dev-support/jdiff/**</exclude>
  372. <exclude>dev-support/*tests</exclude>
  373. <exclude>src/main/native/*</exclude>
  374. <exclude>src/main/native/config/*</exclude>
  375. <exclude>src/main/native/m4/*</exclude>
  376. <exclude>src/test/empty-file</exclude>
  377. <exclude>src/test/all-tests</exclude>
  378. <exclude>src/test/resources/*.tgz</exclude>
  379. <exclude>src/test/resources/data*</exclude>
  380. <exclude>src/test/resources/editsStored*</exclude>
  381. <exclude>src/test/resources/empty-file</exclude>
  382. <exclude>src/main/native/util/tree.h</exclude>
  383. <exclude>src/test/aop/org/apache/hadoop/hdfs/server/datanode/DataXceiverAspects.aj</exclude>
  384. <exclude>src/main/webapps/datanode/robots.txt</exclude>
  385. <exclude>src/main/docs/releasenotes.html</exclude>
  386. <exclude>src/contrib/**</exclude>
  387. <exclude>src/site/resources/images/*</exclude>
  388. <exclude>src/main/webapps/static/bootstrap-3.0.2/**</exclude>
  389. <exclude>src/main/webapps/static/dust-full-2.0.0.min.js</exclude>
  390. <exclude>src/main/webapps/static/dust-helpers-1.1.1.min.js</exclude>
  391. <exclude>src/main/webapps/static/jquery-1.10.2.min.js</exclude>
  392. </excludes>
  393. </configuration>
  394. </plugin>
  395. <plugin>
  396. <artifactId>maven-clean-plugin</artifactId>
  397. <configuration>
  398. <filesets>
  399. <fileset>
  400. <directory>src/site/resources</directory>
  401. <includes>
  402. <include>configuration.xsl</include>
  403. <include>hdfs-default.xml</include>
  404. </includes>
  405. <followSymlinks>false</followSymlinks>
  406. </fileset>
  407. </filesets>
  408. </configuration>
  409. </plugin>
  410. </plugins>
  411. </build>
  412. <profiles>
  413. <profile>
  414. <id>native-win</id>
  415. <activation>
  416. <activeByDefault>false</activeByDefault>
  417. <os>
  418. <family>windows</family>
  419. </os>
  420. </activation>
  421. <properties>
  422. <runningWithNative>true</runningWithNative>
  423. </properties>
  424. <build>
  425. <plugins>
  426. <plugin>
  427. <groupId>org.apache.maven.plugins</groupId>
  428. <artifactId>maven-enforcer-plugin</artifactId>
  429. <executions>
  430. <execution>
  431. <id>enforce-os</id>
  432. <goals>
  433. <goal>enforce</goal>
  434. </goals>
  435. <configuration>
  436. <rules>
  437. <requireOS>
  438. <family>windows</family>
  439. <message>native-win build only supported on Windows</message>
  440. </requireOS>
  441. </rules>
  442. <fail>true</fail>
  443. </configuration>
  444. </execution>
  445. </executions>
  446. </plugin>
  447. <plugin>
  448. <groupId>org.apache.maven.plugins</groupId>
  449. <artifactId>maven-antrun-plugin</artifactId>
  450. <executions>
  451. <execution>
  452. <id>make</id>
  453. <phase>compile</phase>
  454. <goals>
  455. <goal>run</goal>
  456. </goals>
  457. <configuration>
  458. <target>
  459. <condition property="generator" value="Visual Studio 10" else="Visual Studio 10 Win64">
  460. <equals arg1="Win32" arg2="${env.PLATFORM}" />
  461. </condition>
  462. <mkdir dir="${project.build.directory}/native"/>
  463. <exec executable="cmake" dir="${project.build.directory}/native"
  464. failonerror="true">
  465. <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}'"/>
  466. </exec>
  467. <exec executable="msbuild" dir="${project.build.directory}/native"
  468. failonerror="true">
  469. <arg line="ALL_BUILD.vcxproj /nologo /p:Configuration=RelWithDebInfo /p:LinkIncremental=false"/>
  470. </exec>
  471. <!-- Copy for inclusion in distribution. -->
  472. <copy todir="${project.build.directory}/bin">
  473. <fileset dir="${project.build.directory}/native/target/bin/RelWithDebInfo"/>
  474. </copy>
  475. </target>
  476. </configuration>
  477. </execution>
  478. <execution>
  479. <id>native_tests</id>
  480. <phase>test</phase>
  481. <goals><goal>run</goal></goals>
  482. <configuration>
  483. <skip>${skipTests}</skip>
  484. <target>
  485. <property name="compile_classpath" refid="maven.compile.classpath"/>
  486. <property name="test_classpath" refid="maven.test.classpath"/>
  487. <macrodef name="run-test">
  488. <attribute name="test"/>
  489. <sequential>
  490. <echo message="Running @{test}"/>
  491. <exec executable="${project.build.directory}/native/RelWithDebInfo/@{test}" failonerror="true" dir="${project.build.directory}/native/">
  492. <env key="CLASSPATH" value="${test_classpath}:${compile_classpath}"/>
  493. <!-- HADOOP_HOME required to find winutils. -->
  494. <env key="HADOOP_HOME" value="${hadoop.common.build.dir}"/>
  495. <!-- Make sure hadoop.dll and jvm.dll are on PATH. -->
  496. <env key="PATH" value="${env.PATH};${hadoop.common.build.dir}/bin;${java.home}/jre/bin/server;${java.home}/bin/server"/>
  497. </exec>
  498. <echo message="Finished @{test}"/>
  499. </sequential>
  500. </macrodef>
  501. <run-test test="test_libhdfs_threaded"/>
  502. <echo message="Skipping test_libhdfs_zerocopy"/>
  503. <run-test test="test_native_mini_dfs"/>
  504. </target>
  505. </configuration>
  506. </execution>
  507. </executions>
  508. </plugin>
  509. </plugins>
  510. </build>
  511. </profile>
  512. <profile>
  513. <id>native</id>
  514. <activation>
  515. <activeByDefault>false</activeByDefault>
  516. </activation>
  517. <properties>
  518. <runningWithNative>true</runningWithNative>
  519. </properties>
  520. <build>
  521. <plugins>
  522. <plugin>
  523. <groupId>org.apache.maven.plugins</groupId>
  524. <artifactId>maven-antrun-plugin</artifactId>
  525. <executions>
  526. <execution>
  527. <id>make</id>
  528. <phase>compile</phase>
  529. <goals><goal>run</goal></goals>
  530. <configuration>
  531. <target>
  532. <mkdir dir="${project.build.directory}/native"/>
  533. <exec executable="cmake" dir="${project.build.directory}/native"
  534. failonerror="true">
  535. <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}"/>
  536. </exec>
  537. <exec executable="make" dir="${project.build.directory}/native" failonerror="true">
  538. <arg line="VERBOSE=1"/>
  539. </exec>
  540. <!-- The second make is a workaround for HADOOP-9215. It can
  541. be removed when version 2.6 of cmake is no longer supported . -->
  542. <exec executable="make" dir="${project.build.directory}/native" failonerror="true"></exec>
  543. </target>
  544. </configuration>
  545. </execution>
  546. <execution>
  547. <id>native_tests</id>
  548. <phase>test</phase>
  549. <goals><goal>run</goal></goals>
  550. <configuration>
  551. <skip>${skipTests}</skip>
  552. <target>
  553. <property name="compile_classpath" refid="maven.compile.classpath"/>
  554. <property name="test_classpath" refid="maven.test.classpath"/>
  555. <macrodef name="run-test">
  556. <attribute name="test"/>
  557. <sequential>
  558. <echo message="Running @{test}"/>
  559. <exec executable="${project.build.directory}/native/@{test}" failonerror="true" dir="${project.build.directory}/native/">
  560. <env key="CLASSPATH" value="${test_classpath}:${compile_classpath}"/>
  561. <!-- Make sure libhadoop.so is on LD_LIBRARY_PATH. -->
  562. <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"/>
  563. </exec>
  564. <echo message="Finished @{test}"/>
  565. </sequential>
  566. </macrodef>
  567. <run-test test="test_libhdfs_threaded"/>
  568. <run-test test="test_libhdfs_zerocopy"/>
  569. <run-test test="test_native_mini_dfs"/>
  570. </target>
  571. </configuration>
  572. </execution>
  573. </executions>
  574. </plugin>
  575. </plugins>
  576. </build>
  577. </profile>
  578. <profile>
  579. <id>parallel-tests</id>
  580. <build>
  581. <plugins>
  582. <plugin>
  583. <artifactId>maven-antrun-plugin</artifactId>
  584. <executions>
  585. <execution>
  586. <id>create-parallel-tests-dirs</id>
  587. <phase>test-compile</phase>
  588. <configuration>
  589. <target>
  590. <exec executable="${shell-executable}">
  591. <arg value="-c"/>
  592. <arg value="for i in {1..${testsThreadCount}}; do mkdir -p ${test.build.data}/$i; mkdir -p ${hadoop.tmp.dir}/$i; done"/>
  593. </exec>
  594. </target>
  595. </configuration>
  596. <goals>
  597. <goal>run</goal>
  598. </goals>
  599. </execution>
  600. </executions>
  601. </plugin>
  602. <plugin>
  603. <groupId>org.apache.maven.plugins</groupId>
  604. <artifactId>maven-surefire-plugin</artifactId>
  605. <configuration>
  606. <forkCount>${testsThreadCount}</forkCount>
  607. <argLine>-Xmx1024m -XX:+HeapDumpOnOutOfMemoryError -DminiClusterDedicatedDirs=true</argLine>
  608. <systemPropertyVariables>
  609. <test.build.data>${test.build.data}/${surefire.forkNumber}</test.build.data>
  610. <hadoop.tmp.dir>${hadoop.tmp.dir}/${surefire.forkNumber}</hadoop.tmp.dir>
  611. </systemPropertyVariables>
  612. </configuration>
  613. </plugin>
  614. </plugins>
  615. </build>
  616. </profile>
  617. </profiles>
  618. </project>