pom.xml 26 KB

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