pom.xml 26 KB

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