pom.xml 25 KB

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