pom.xml 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682
  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. <version>3.4.2</version>
  63. <type>test-jar</type>
  64. <scope>test</scope>
  65. </dependency>
  66. <dependency>
  67. <groupId>com.google.guava</groupId>
  68. <artifactId>guava</artifactId>
  69. <scope>compile</scope>
  70. </dependency>
  71. <dependency>
  72. <groupId>org.mortbay.jetty</groupId>
  73. <artifactId>jetty</artifactId>
  74. <scope>compile</scope>
  75. </dependency>
  76. <dependency>
  77. <groupId>org.mortbay.jetty</groupId>
  78. <artifactId>jetty-util</artifactId>
  79. <scope>compile</scope>
  80. </dependency>
  81. <dependency>
  82. <groupId>com.sun.jersey</groupId>
  83. <artifactId>jersey-core</artifactId>
  84. <scope>compile</scope>
  85. </dependency>
  86. <dependency>
  87. <groupId>com.sun.jersey</groupId>
  88. <artifactId>jersey-server</artifactId>
  89. <scope>compile</scope>
  90. </dependency>
  91. <dependency>
  92. <groupId>commons-cli</groupId>
  93. <artifactId>commons-cli</artifactId>
  94. <scope>compile</scope>
  95. </dependency>
  96. <dependency>
  97. <groupId>commons-codec</groupId>
  98. <artifactId>commons-codec</artifactId>
  99. <scope>compile</scope>
  100. </dependency>
  101. <dependency>
  102. <groupId>commons-io</groupId>
  103. <artifactId>commons-io</artifactId>
  104. <scope>compile</scope>
  105. </dependency>
  106. <dependency>
  107. <groupId>commons-lang</groupId>
  108. <artifactId>commons-lang</artifactId>
  109. <scope>compile</scope>
  110. </dependency>
  111. <dependency>
  112. <groupId>commons-logging</groupId>
  113. <artifactId>commons-logging</artifactId>
  114. <scope>compile</scope>
  115. </dependency>
  116. <dependency>
  117. <groupId>commons-daemon</groupId>
  118. <artifactId>commons-daemon</artifactId>
  119. <scope>compile</scope>
  120. </dependency>
  121. <dependency>
  122. <groupId>javax.servlet.jsp</groupId>
  123. <artifactId>jsp-api</artifactId>
  124. <scope>compile</scope>
  125. </dependency>
  126. <dependency>
  127. <groupId>log4j</groupId>
  128. <artifactId>log4j</artifactId>
  129. <scope>compile</scope>
  130. </dependency>
  131. <dependency>
  132. <groupId>com.google.protobuf</groupId>
  133. <artifactId>protobuf-java</artifactId>
  134. <scope>compile</scope>
  135. </dependency>
  136. <dependency>
  137. <groupId>javax.servlet</groupId>
  138. <artifactId>servlet-api</artifactId>
  139. <scope>compile</scope>
  140. </dependency>
  141. <dependency>
  142. <groupId>junit</groupId>
  143. <artifactId>junit</artifactId>
  144. <scope>test</scope>
  145. </dependency>
  146. <dependency>
  147. <groupId>org.mockito</groupId>
  148. <artifactId>mockito-all</artifactId>
  149. <scope>test</scope>
  150. </dependency>
  151. <dependency>
  152. <groupId>org.slf4j</groupId>
  153. <artifactId>slf4j-log4j12</artifactId>
  154. <scope>provided</scope>
  155. </dependency>
  156. <dependency>
  157. <groupId>org.codehaus.jackson</groupId>
  158. <artifactId>jackson-core-asl</artifactId>
  159. <scope>compile</scope>
  160. </dependency>
  161. <dependency>
  162. <groupId>org.codehaus.jackson</groupId>
  163. <artifactId>jackson-mapper-asl</artifactId>
  164. <scope>compile</scope>
  165. </dependency>
  166. <dependency>
  167. <groupId>tomcat</groupId>
  168. <artifactId>jasper-runtime</artifactId>
  169. <scope>compile</scope>
  170. </dependency>
  171. <dependency>
  172. <groupId>xmlenc</groupId>
  173. <artifactId>xmlenc</artifactId>
  174. <scope>compile</scope>
  175. </dependency>
  176. </dependencies>
  177. <build>
  178. <plugins>
  179. <plugin>
  180. <groupId>org.apache.maven.plugins</groupId>
  181. <artifactId>maven-surefire-plugin</artifactId>
  182. <configuration>
  183. <systemPropertyVariables>
  184. <startKdc>${startKdc}</startKdc>
  185. <kdc.resource.dir>${kdc.resource.dir}</kdc.resource.dir>
  186. </systemPropertyVariables>
  187. <properties>
  188. <property>
  189. <name>listener</name>
  190. <value>org.apache.hadoop.test.TimedOutTestsListener</value>
  191. </property>
  192. </properties>
  193. </configuration>
  194. </plugin>
  195. <plugin>
  196. <groupId>org.codehaus.mojo.jspc</groupId>
  197. <artifactId>jspc-maven-plugin</artifactId>
  198. <executions>
  199. <execution>
  200. <id>hdfs</id>
  201. <phase>generate-sources</phase>
  202. <goals>
  203. <goal>compile</goal>
  204. </goals>
  205. <configuration>
  206. <compile>false</compile>
  207. <workingDirectory>${project.build.directory}/generated-src/main/jsp</workingDirectory>
  208. <webFragmentFile>${project.build.directory}/hdfs-jsp-servlet-definitions.xml</webFragmentFile>
  209. <packageName>org.apache.hadoop.hdfs.server.namenode</packageName>
  210. <sources>
  211. <directory>${basedir}/src/main/webapps/hdfs</directory>
  212. <includes>
  213. <include>*.jsp</include>
  214. </includes>
  215. </sources>
  216. </configuration>
  217. </execution>
  218. <execution>
  219. <id>secondary</id>
  220. <phase>generate-sources</phase>
  221. <goals>
  222. <goal>compile</goal>
  223. </goals>
  224. <configuration>
  225. <compile>false</compile>
  226. <workingDirectory>${project.build.directory}/generated-src/main/jsp</workingDirectory>
  227. <webFragmentFile>${project.build.directory}/secondary-jsp-servlet-definitions.xml</webFragmentFile>
  228. <packageName>org.apache.hadoop.hdfs.server.namenode</packageName>
  229. <sources>
  230. <directory>${basedir}/src/main/webapps/secondary</directory>
  231. <includes>
  232. <include>*.jsp</include>
  233. </includes>
  234. </sources>
  235. </configuration>
  236. </execution>
  237. <execution>
  238. <id>journal</id>
  239. <phase>generate-sources</phase>
  240. <goals>
  241. <goal>compile</goal>
  242. </goals>
  243. <configuration>
  244. <compile>false</compile>
  245. <workingDirectory>${project.build.directory}/generated-src/main/jsp</workingDirectory>
  246. <webFragmentFile>${project.build.directory}/journal-jsp-servlet-definitions.xml</webFragmentFile>
  247. <packageName>org.apache.hadoop.hdfs.server.journalservice</packageName>
  248. <sources>
  249. <directory>${basedir}/src/main/webapps/journal</directory>
  250. <includes>
  251. <include>*.jsp</include>
  252. </includes>
  253. </sources>
  254. </configuration>
  255. </execution>
  256. <execution>
  257. <id>datanode</id>
  258. <phase>generate-sources</phase>
  259. <goals>
  260. <goal>compile</goal>
  261. </goals>
  262. <configuration>
  263. <compile>false</compile>
  264. <workingDirectory>${project.build.directory}/generated-src/main/jsp</workingDirectory>
  265. <webFragmentFile>${project.build.directory}/datanode-jsp-servlet-definitions.xml</webFragmentFile>
  266. <packageName>org.apache.hadoop.hdfs.server.datanode</packageName>
  267. <sources>
  268. <directory>${basedir}/src/main/webapps/datanode</directory>
  269. <includes>
  270. <include>*.jsp</include>
  271. </includes>
  272. </sources>
  273. </configuration>
  274. </execution>
  275. </executions>
  276. <dependencies>
  277. <dependency>
  278. <groupId>org.codehaus.mojo.jspc</groupId>
  279. <artifactId>jspc-compiler-tomcat5</artifactId>
  280. <version>2.0-alpha-3</version>
  281. </dependency>
  282. <dependency>
  283. <groupId>org.slf4j</groupId>
  284. <artifactId>slf4j-log4j12</artifactId>
  285. <version>1.4.1</version>
  286. </dependency>
  287. <dependency>
  288. <groupId>org.slf4j</groupId>
  289. <artifactId>jcl104-over-slf4j</artifactId>
  290. <version>1.4.1</version>
  291. </dependency>
  292. </dependencies>
  293. </plugin>
  294. <plugin>
  295. <groupId>org.codehaus.mojo</groupId>
  296. <artifactId>build-helper-maven-plugin</artifactId>
  297. <executions>
  298. <execution>
  299. <id>add-source</id>
  300. <phase>generate-sources</phase>
  301. <goals>
  302. <goal>add-source</goal>
  303. </goals>
  304. <configuration>
  305. <sources>
  306. <source>${project.build.directory}/generated-sources/java</source>
  307. <source>${project.build.directory}/generated-src/main/jsp</source>
  308. </sources>
  309. </configuration>
  310. </execution>
  311. </executions>
  312. </plugin>
  313. <plugin>
  314. <groupId>org.apache.maven.plugins</groupId>
  315. <artifactId>maven-antrun-plugin</artifactId>
  316. <executions>
  317. <execution>
  318. <id>create-protobuf-generated-sources-directory</id>
  319. <phase>initialize</phase>
  320. <goals>
  321. <goal>run</goal>
  322. </goals>
  323. <configuration>
  324. <target>
  325. <mkdir dir="target/generated-sources/java" />
  326. </target>
  327. </configuration>
  328. </execution>
  329. <execution>
  330. <id>create-web-xmls</id>
  331. <phase>compile</phase>
  332. <goals>
  333. <goal>run</goal>
  334. </goals>
  335. <configuration>
  336. <target>
  337. <loadfile property="hdfs.servlet.definitions" srcFile="${project.build.directory}/hdfs-jsp-servlet-definitions.xml"/>
  338. <loadfile property="secondary.servlet.definitions" srcFile="${project.build.directory}/secondary-jsp-servlet-definitions.xml"/>
  339. <loadfile property="datanode.servlet.definitions" srcFile="${project.build.directory}/datanode-jsp-servlet-definitions.xml"/>
  340. <loadfile property="journal.servlet.definitions" srcFile="${project.build.directory}/journal-jsp-servlet-definitions.xml"/>
  341. <echoproperties destfile="${project.build.directory}/webxml.properties">
  342. <propertyset>
  343. <propertyref regex=".*.servlet.definitions"/>
  344. </propertyset>
  345. </echoproperties>
  346. <filter filtersfile="${project.build.directory}/webxml.properties"/>
  347. <copy file="${basedir}/src/main/webapps/proto-hdfs-web.xml"
  348. tofile="${project.build.directory}/webapps/hdfs/WEB-INF/web.xml"
  349. filtering="true"/>
  350. <copy file="${basedir}/src/main/webapps/proto-secondary-web.xml"
  351. tofile="${project.build.directory}/webapps/secondary/WEB-INF/web.xml"
  352. filtering="true"/>
  353. <copy file="${basedir}/src/main/webapps/proto-datanode-web.xml"
  354. tofile="${project.build.directory}/webapps/datanode/WEB-INF/web.xml"
  355. filtering="true"/>
  356. <copy file="${basedir}/src/main/webapps/proto-journal-web.xml"
  357. tofile="${project.build.directory}/webapps/journal/WEB-INF/web.xml"
  358. filtering="true"/>
  359. <copy toDir="${project.build.directory}/webapps">
  360. <fileset dir="${basedir}/src/main/webapps">
  361. <exclude name="**/*.jsp"/>
  362. <exclude name="**/proto-*-web.xml"/>
  363. </fileset>
  364. </copy>
  365. </target>
  366. </configuration>
  367. </execution>
  368. <execution>
  369. <id>create-log-dir</id>
  370. <phase>process-test-resources</phase>
  371. <goals>
  372. <goal>run</goal>
  373. </goals>
  374. <configuration>
  375. <target>
  376. <delete dir="${test.build.data}"/>
  377. <mkdir dir="${test.build.data}"/>
  378. <mkdir dir="${hadoop.log.dir}"/>
  379. <copy todir="${project.build.directory}/test-classes/webapps">
  380. <fileset dir="${project.build.directory}/webapps">
  381. <exclude name="proto-*-web.xml"/>
  382. </fileset>
  383. </copy>
  384. </target>
  385. </configuration>
  386. </execution>
  387. <execution>
  388. <phase>pre-site</phase>
  389. <goals>
  390. <goal>run</goal>
  391. </goals>
  392. <configuration>
  393. <tasks>
  394. <copy file="src/main/resources/hdfs-default.xml" todir="src/site/resources"/>
  395. <copy file="src/main/xsl/configuration.xsl" todir="src/site/resources"/>
  396. </tasks>
  397. </configuration>
  398. </execution>
  399. </executions>
  400. </plugin>
  401. <plugin>
  402. <groupId>org.codehaus.mojo</groupId>
  403. <artifactId>exec-maven-plugin</artifactId>
  404. <executions>
  405. <execution>
  406. <id>compile-proto</id>
  407. <phase>generate-sources</phase>
  408. <goals>
  409. <goal>exec</goal>
  410. </goals>
  411. <configuration>
  412. <executable>protoc</executable>
  413. <arguments>
  414. <argument>-Isrc/main/proto/</argument>
  415. <argument>--java_out=target/generated-sources/java</argument>
  416. <argument>src/main/proto/GetUserMappingsProtocol.proto</argument>
  417. <argument>src/main/proto/HAZKInfo.proto</argument>
  418. <argument>src/main/proto/InterDatanodeProtocol.proto</argument>
  419. <argument>src/main/proto/JournalProtocol.proto</argument>
  420. <argument>src/main/proto/RefreshAuthorizationPolicyProtocol.proto</argument>
  421. <argument>src/main/proto/RefreshUserMappingsProtocol.proto</argument>
  422. <argument>src/main/proto/datatransfer.proto</argument>
  423. <argument>src/main/proto/hdfs.proto</argument>
  424. </arguments>
  425. </configuration>
  426. </execution>
  427. <execution>
  428. <id>compile-proto-datanode</id>
  429. <phase>generate-sources</phase>
  430. <goals>
  431. <goal>exec</goal>
  432. </goals>
  433. <configuration>
  434. <executable>protoc</executable>
  435. <arguments>
  436. <argument>-Isrc/main/proto/</argument>
  437. <argument>--java_out=target/generated-sources/java</argument>
  438. <argument>src/main/proto/ClientDatanodeProtocol.proto</argument>
  439. <argument>src/main/proto/DatanodeProtocol.proto</argument>
  440. </arguments>
  441. </configuration>
  442. </execution>
  443. <execution>
  444. <id>compile-proto-namenode</id>
  445. <phase>generate-sources</phase>
  446. <goals>
  447. <goal>exec</goal>
  448. </goals>
  449. <configuration>
  450. <executable>protoc</executable>
  451. <arguments>
  452. <argument>-Isrc/main/proto/</argument>
  453. <argument>--java_out=target/generated-sources/java</argument>
  454. <argument>src/main/proto/ClientNamenodeProtocol.proto</argument>
  455. <argument>src/main/proto/NamenodeProtocol.proto</argument>
  456. </arguments>
  457. </configuration>
  458. </execution>
  459. <execution>
  460. <id>compile-proto-qjournal</id>
  461. <phase>generate-sources</phase>
  462. <goals>
  463. <goal>exec</goal>
  464. </goals>
  465. <configuration>
  466. <executable>protoc</executable>
  467. <arguments>
  468. <argument>-Isrc/main/proto/</argument>
  469. <argument>--java_out=target/generated-sources/java</argument>
  470. <argument>src/main/proto/QJournalProtocol.proto</argument>
  471. </arguments>
  472. </configuration>
  473. </execution>
  474. </executions>
  475. </plugin>
  476. <plugin>
  477. <groupId>org.apache.maven.plugins</groupId>
  478. <artifactId>maven-javadoc-plugin</artifactId>
  479. <configuration>
  480. <excludePackageNames>org.apache.hadoop.hdfs.protocol.proto</excludePackageNames>
  481. </configuration>
  482. </plugin>
  483. <plugin>
  484. <groupId>org.apache.rat</groupId>
  485. <artifactId>apache-rat-plugin</artifactId>
  486. <configuration>
  487. <excludes>
  488. <exclude>CHANGES.txt</exclude>
  489. <exclude>CHANGES.HDFS-1623.txt</exclude>
  490. <exclude>.idea/**</exclude>
  491. <exclude>src/main/conf/*</exclude>
  492. <exclude>src/main/docs/**</exclude>
  493. <exclude>dev-support/findbugsExcludeFile.xml</exclude>
  494. <exclude>dev-support/checkstyle*</exclude>
  495. <exclude>dev-support/jdiff/**</exclude>
  496. <exclude>dev-support/*tests</exclude>
  497. <exclude>src/main/native/*</exclude>
  498. <exclude>src/main/native/config/*</exclude>
  499. <exclude>src/main/native/m4/*</exclude>
  500. <exclude>src/test/empty-file</exclude>
  501. <exclude>src/test/all-tests</exclude>
  502. <exclude>src/test/resources/*.tgz</exclude>
  503. <exclude>src/test/resources/data*</exclude>
  504. <exclude>src/test/resources/editsStored*</exclude>
  505. <exclude>src/test/resources/empty-file</exclude>
  506. <exclude>src/main/webapps/datanode/robots.txt</exclude>
  507. <exclude>src/main/docs/releasenotes.html</exclude>
  508. <exclude>src/contrib/**</exclude>
  509. </excludes>
  510. </configuration>
  511. </plugin>
  512. </plugins>
  513. </build>
  514. <profiles>
  515. <profile>
  516. <id>windows</id>
  517. <activation>
  518. <activeByDefault>false</activeByDefault>
  519. <os>
  520. <family>windows</family>
  521. </os>
  522. </activation>
  523. <properties>
  524. <windows.build>true</windows.build>
  525. </properties>
  526. </profile>
  527. <profile>
  528. <id>native</id>
  529. <activation>
  530. <activeByDefault>false</activeByDefault>
  531. </activation>
  532. <build>
  533. <plugins>
  534. <plugin>
  535. <artifactId>maven-antrun-plugin</artifactId>
  536. <version>1.7</version>
  537. <executions>
  538. <execution>
  539. <id>define-classpath</id>
  540. <phase>process-resources</phase>
  541. <goals><goal>run</goal></goals>
  542. <configuration>
  543. <exportAntProperties>true</exportAntProperties>
  544. <tests>
  545. <property name="test.classpath" refid="maven.test.classpath"/>
  546. </tests>
  547. </configuration>
  548. </execution>
  549. </executions>
  550. </plugin>
  551. <plugin>
  552. <groupId>org.apache.hadoop.cmake.maven.ng</groupId>
  553. <artifactId>cmake-ng</artifactId>
  554. <executions>
  555. <execution>
  556. <id>cmake-compile</id>
  557. <goals><goal>compile</goal></goals>
  558. <configuration>
  559. <target>all</target>
  560. <source>${basedir}/src</source>
  561. <vars>
  562. <GENERATED_JAVAH>${project.build.directory}/native/javah</GENERATED_JAVAH>
  563. <JVM_ARCH_DATA_MODEL>${sun.arch.data.model}</JVM_ARCH_DATA_MODEL>
  564. <REQUIRE_FUSE>${require.fuse}</REQUIRE_FUSE>
  565. <REQUIRE_LIBWEBHDFS>${require.libwebhdfs}</REQUIRE_LIBWEBHDFS>
  566. </vars>
  567. </configuration>
  568. </execution>
  569. <execution>
  570. <id>test_libhdfs_threaded</id>
  571. <goals><goal>test</goal></goals>
  572. <configuration>
  573. <binary>${project.build.directory}/native/test_libhdfs_threaded</binary>
  574. <env><CLASSPATH>${test.classpath}</CLASSPATH></env>
  575. <timeout>300</timeout>
  576. <results>${project.build.directory}/results</results>
  577. </configuration>
  578. </execution>
  579. <execution>
  580. <id>test_native_mini_dfs</id>
  581. <goals><goal>test</goal></goals>
  582. <configuration>
  583. <binary>${project.build.directory}/native/test_native_mini_dfs</binary>
  584. <env><CLASSPATH>${test.classpath}</CLASSPATH></env>
  585. <timeout>300</timeout>
  586. <results>${project.build.directory}/results</results>
  587. </configuration>
  588. </execution>
  589. </executions>
  590. </plugin>
  591. </plugins>
  592. </build>
  593. </profile>
  594. <!-- profile that starts ApacheDS KDC server -->
  595. <profile>
  596. <id>startKdc</id>
  597. <activation>
  598. <property>
  599. <name>startKdc</name>
  600. <value>true</value>
  601. </property>
  602. </activation>
  603. <build>
  604. <plugins>
  605. <plugin>
  606. <groupId>org.apache.maven.plugins</groupId>
  607. <artifactId>maven-enforcer-plugin</artifactId>
  608. <executions>
  609. <execution>
  610. <id>enforce-os</id>
  611. <goals>
  612. <goal>enforce</goal>
  613. </goals>
  614. <configuration>
  615. <rules>
  616. <!-- At present supports Mac and Unix OS family -->
  617. <requireOS>
  618. <family>mac</family>
  619. <family>unix</family>
  620. </requireOS>
  621. </rules>
  622. <fail>true</fail>
  623. </configuration>
  624. </execution>
  625. </executions>
  626. </plugin>
  627. <plugin>
  628. <groupId>org.apache.maven.plugins</groupId>
  629. <artifactId>maven-antrun-plugin</artifactId>
  630. <executions>
  631. <execution>
  632. <id>kdc</id>
  633. <phase>compile</phase>
  634. <goals>
  635. <goal>run</goal>
  636. </goals>
  637. <configuration>
  638. <target>
  639. <chmod file="${kdc.resource.dir}/killKdc.sh" perm="775" />
  640. <exec dir="${kdc.resource.dir}" executable= "./killKdc.sh" />
  641. <mkdir dir="${project.build.directory}/test-classes/kdc/downloads"/>
  642. <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"/>
  643. <untar src="${project.build.directory}/test-classes/kdc/downloads/apacheds-1.5.7.tar.gz" dest="${project.build.directory}/test-classes/kdc" compression="gzip" />
  644. <copy file="${kdc.resource.dir}/server.xml" toDir="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/conf"/>
  645. <mkdir dir="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/ldif"/>
  646. <copy toDir="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/ldif">
  647. <fileset dir="${kdc.resource.dir}/ldif"/>
  648. </copy>
  649. <chmod file="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/apacheds.sh" perm="775" />
  650. <exec dir="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/" executable="./apacheds.sh" spawn="true"/>
  651. </target>
  652. </configuration>
  653. </execution>
  654. <!-- On completion of graceful test phase: closes the ApacheDS KDC server -->
  655. <execution>
  656. <id>killKdc</id>
  657. <phase>test</phase>
  658. <goals>
  659. <goal>run</goal>
  660. </goals>
  661. <configuration>
  662. <target>
  663. <chmod file="${kdc.resource.dir}/killKdc.sh" perm="775" />
  664. <exec dir="${kdc.resource.dir}" executable= "./killKdc.sh" />
  665. </target>
  666. </configuration>
  667. </execution>
  668. </executions>
  669. </plugin>
  670. </plugins>
  671. </build>
  672. </profile>
  673. </profiles>
  674. </project>