pom.xml 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674
  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. <configuration>
  317. <skipTests>false</skipTests>
  318. </configuration>
  319. <executions>
  320. <execution>
  321. <id>create-protobuf-generated-sources-directory</id>
  322. <phase>initialize</phase>
  323. <goals>
  324. <goal>run</goal>
  325. </goals>
  326. <configuration>
  327. <target>
  328. <mkdir dir="target/generated-sources/java" />
  329. </target>
  330. </configuration>
  331. </execution>
  332. <execution>
  333. <id>create-web-xmls</id>
  334. <phase>compile</phase>
  335. <goals>
  336. <goal>run</goal>
  337. </goals>
  338. <configuration>
  339. <target>
  340. <loadfile property="hdfs.servlet.definitions" srcFile="${project.build.directory}/hdfs-jsp-servlet-definitions.xml"/>
  341. <loadfile property="secondary.servlet.definitions" srcFile="${project.build.directory}/secondary-jsp-servlet-definitions.xml"/>
  342. <loadfile property="datanode.servlet.definitions" srcFile="${project.build.directory}/datanode-jsp-servlet-definitions.xml"/>
  343. <loadfile property="journal.servlet.definitions" srcFile="${project.build.directory}/journal-jsp-servlet-definitions.xml"/>
  344. <echoproperties destfile="${project.build.directory}/webxml.properties">
  345. <propertyset>
  346. <propertyref regex=".*.servlet.definitions"/>
  347. </propertyset>
  348. </echoproperties>
  349. <filter filtersfile="${project.build.directory}/webxml.properties"/>
  350. <copy file="${basedir}/src/main/webapps/proto-hdfs-web.xml"
  351. tofile="${project.build.directory}/webapps/hdfs/WEB-INF/web.xml"
  352. filtering="true"/>
  353. <copy file="${basedir}/src/main/webapps/proto-secondary-web.xml"
  354. tofile="${project.build.directory}/webapps/secondary/WEB-INF/web.xml"
  355. filtering="true"/>
  356. <copy file="${basedir}/src/main/webapps/proto-datanode-web.xml"
  357. tofile="${project.build.directory}/webapps/datanode/WEB-INF/web.xml"
  358. filtering="true"/>
  359. <copy file="${basedir}/src/main/webapps/proto-journal-web.xml"
  360. tofile="${project.build.directory}/webapps/journal/WEB-INF/web.xml"
  361. filtering="true"/>
  362. <copy toDir="${project.build.directory}/webapps">
  363. <fileset dir="${basedir}/src/main/webapps">
  364. <exclude name="**/*.jsp"/>
  365. <exclude name="**/proto-*-web.xml"/>
  366. </fileset>
  367. </copy>
  368. </target>
  369. </configuration>
  370. </execution>
  371. <execution>
  372. <id>create-log-dir</id>
  373. <phase>process-test-resources</phase>
  374. <goals>
  375. <goal>run</goal>
  376. </goals>
  377. <configuration>
  378. <target>
  379. <delete dir="${test.build.data}"/>
  380. <mkdir dir="${test.build.data}"/>
  381. <mkdir dir="${hadoop.log.dir}"/>
  382. <copy todir="${project.build.directory}/test-classes/webapps">
  383. <fileset dir="${project.build.directory}/webapps">
  384. <exclude name="proto-*-web.xml"/>
  385. </fileset>
  386. </copy>
  387. </target>
  388. </configuration>
  389. </execution>
  390. <execution>
  391. <phase>pre-site</phase>
  392. <goals>
  393. <goal>run</goal>
  394. </goals>
  395. <configuration>
  396. <tasks>
  397. <copy file="src/main/resources/hdfs-default.xml" todir="src/site/resources"/>
  398. <copy file="src/main/xsl/configuration.xsl" todir="src/site/resources"/>
  399. </tasks>
  400. </configuration>
  401. </execution>
  402. </executions>
  403. </plugin>
  404. <plugin>
  405. <groupId>org.codehaus.mojo</groupId>
  406. <artifactId>exec-maven-plugin</artifactId>
  407. <executions>
  408. <execution>
  409. <id>compile-proto</id>
  410. <phase>generate-sources</phase>
  411. <goals>
  412. <goal>exec</goal>
  413. </goals>
  414. <configuration>
  415. <executable>protoc</executable>
  416. <arguments>
  417. <argument>-Isrc/main/proto/</argument>
  418. <argument>--java_out=target/generated-sources/java</argument>
  419. <argument>src/main/proto/GetUserMappingsProtocol.proto</argument>
  420. <argument>src/main/proto/HAZKInfo.proto</argument>
  421. <argument>src/main/proto/InterDatanodeProtocol.proto</argument>
  422. <argument>src/main/proto/JournalProtocol.proto</argument>
  423. <argument>src/main/proto/RefreshAuthorizationPolicyProtocol.proto</argument>
  424. <argument>src/main/proto/RefreshUserMappingsProtocol.proto</argument>
  425. <argument>src/main/proto/datatransfer.proto</argument>
  426. <argument>src/main/proto/hdfs.proto</argument>
  427. </arguments>
  428. </configuration>
  429. </execution>
  430. <execution>
  431. <id>compile-proto-datanode</id>
  432. <phase>generate-sources</phase>
  433. <goals>
  434. <goal>exec</goal>
  435. </goals>
  436. <configuration>
  437. <executable>protoc</executable>
  438. <arguments>
  439. <argument>-Isrc/main/proto/</argument>
  440. <argument>--java_out=target/generated-sources/java</argument>
  441. <argument>src/main/proto/ClientDatanodeProtocol.proto</argument>
  442. <argument>src/main/proto/DatanodeProtocol.proto</argument>
  443. </arguments>
  444. </configuration>
  445. </execution>
  446. <execution>
  447. <id>compile-proto-namenode</id>
  448. <phase>generate-sources</phase>
  449. <goals>
  450. <goal>exec</goal>
  451. </goals>
  452. <configuration>
  453. <executable>protoc</executable>
  454. <arguments>
  455. <argument>-Isrc/main/proto/</argument>
  456. <argument>--java_out=target/generated-sources/java</argument>
  457. <argument>src/main/proto/ClientNamenodeProtocol.proto</argument>
  458. <argument>src/main/proto/NamenodeProtocol.proto</argument>
  459. </arguments>
  460. </configuration>
  461. </execution>
  462. <execution>
  463. <id>compile-proto-qjournal</id>
  464. <phase>generate-sources</phase>
  465. <goals>
  466. <goal>exec</goal>
  467. </goals>
  468. <configuration>
  469. <executable>protoc</executable>
  470. <arguments>
  471. <argument>-Isrc/main/proto/</argument>
  472. <argument>--java_out=target/generated-sources/java</argument>
  473. <argument>src/main/proto/QJournalProtocol.proto</argument>
  474. </arguments>
  475. </configuration>
  476. </execution>
  477. </executions>
  478. </plugin>
  479. <plugin>
  480. <groupId>org.apache.maven.plugins</groupId>
  481. <artifactId>maven-javadoc-plugin</artifactId>
  482. <configuration>
  483. <excludePackageNames>org.apache.hadoop.hdfs.protocol.proto</excludePackageNames>
  484. </configuration>
  485. </plugin>
  486. <plugin>
  487. <groupId>org.apache.rat</groupId>
  488. <artifactId>apache-rat-plugin</artifactId>
  489. <configuration>
  490. <excludes>
  491. <exclude>CHANGES.txt</exclude>
  492. <exclude>CHANGES.HDFS-1623.txt</exclude>
  493. <exclude>.idea/**</exclude>
  494. <exclude>src/main/conf/*</exclude>
  495. <exclude>src/main/docs/**</exclude>
  496. <exclude>dev-support/findbugsExcludeFile.xml</exclude>
  497. <exclude>dev-support/checkstyle*</exclude>
  498. <exclude>dev-support/jdiff/**</exclude>
  499. <exclude>dev-support/*tests</exclude>
  500. <exclude>src/main/native/*</exclude>
  501. <exclude>src/main/native/config/*</exclude>
  502. <exclude>src/main/native/m4/*</exclude>
  503. <exclude>src/test/empty-file</exclude>
  504. <exclude>src/test/all-tests</exclude>
  505. <exclude>src/test/resources/*.tgz</exclude>
  506. <exclude>src/test/resources/data*</exclude>
  507. <exclude>src/test/resources/editsStored*</exclude>
  508. <exclude>src/test/resources/empty-file</exclude>
  509. <exclude>src/main/webapps/datanode/robots.txt</exclude>
  510. <exclude>src/main/docs/releasenotes.html</exclude>
  511. <exclude>src/contrib/**</exclude>
  512. </excludes>
  513. </configuration>
  514. </plugin>
  515. </plugins>
  516. </build>
  517. <profiles>
  518. <profile>
  519. <id>windows</id>
  520. <activation>
  521. <activeByDefault>false</activeByDefault>
  522. <os>
  523. <family>windows</family>
  524. </os>
  525. </activation>
  526. <properties>
  527. <windows.build>true</windows.build>
  528. </properties>
  529. </profile>
  530. <profile>
  531. <id>native</id>
  532. <activation>
  533. <activeByDefault>false</activeByDefault>
  534. </activation>
  535. <build>
  536. <plugins>
  537. <plugin>
  538. <groupId>org.apache.maven.plugins</groupId>
  539. <artifactId>maven-antrun-plugin</artifactId>
  540. <executions>
  541. <execution>
  542. <id>make</id>
  543. <phase>compile</phase>
  544. <goals><goal>run</goal></goals>
  545. <configuration>
  546. <target>
  547. <mkdir dir="${project.build.directory}/native"/>
  548. <exec executable="cmake" dir="${project.build.directory}/native"
  549. failonerror="true">
  550. <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}"/>
  551. </exec>
  552. <exec executable="make" dir="${project.build.directory}/native" failonerror="true">
  553. <arg line="VERBOSE=1"/>
  554. </exec>
  555. </target>
  556. </configuration>
  557. </execution>
  558. <execution>
  559. <id>native_tests</id>
  560. <phase>test</phase>
  561. <goals><goal>run</goal></goals>
  562. <configuration>
  563. <target>
  564. <property name="compile_classpath" refid="maven.compile.classpath"/>
  565. <property name="test_classpath" refid="maven.test.classpath"/>
  566. <exec executable="sh" failonerror="true" dir="${project.build.directory}/native/">
  567. <arg value="-c"/>
  568. <arg value="[ x$SKIPTESTS = xtrue ] || ${project.build.directory}/native/test_libhdfs_threaded"/>
  569. <env key="CLASSPATH" value="${test_classpath}:${compile_classpath}"/>
  570. <env key="SKIPTESTS" value="${skipTests}"/>
  571. </exec>
  572. <exec executable="sh" failonerror="true" dir="${project.build.directory}/native/">
  573. <arg value="-c"/>
  574. <arg value="[ x$SKIPTESTS = xtrue ] || ${project.build.directory}/native/test_libhdfs_threaded"/>
  575. <env key="CLASSPATH" value="${test_classpath}:${compile_classpath}"/>
  576. <env key="SKIPTESTS" value="${skipTests}"/>
  577. </exec>
  578. </target>
  579. </configuration>
  580. </execution>
  581. </executions>
  582. </plugin>
  583. </plugins>
  584. </build>
  585. </profile>
  586. <!-- profile that starts ApacheDS KDC server -->
  587. <profile>
  588. <id>startKdc</id>
  589. <activation>
  590. <property>
  591. <name>startKdc</name>
  592. <value>true</value>
  593. </property>
  594. </activation>
  595. <build>
  596. <plugins>
  597. <plugin>
  598. <groupId>org.apache.maven.plugins</groupId>
  599. <artifactId>maven-enforcer-plugin</artifactId>
  600. <executions>
  601. <execution>
  602. <id>enforce-os</id>
  603. <goals>
  604. <goal>enforce</goal>
  605. </goals>
  606. <configuration>
  607. <rules>
  608. <!-- At present supports Mac and Unix OS family -->
  609. <requireOS>
  610. <family>mac</family>
  611. <family>unix</family>
  612. </requireOS>
  613. </rules>
  614. <fail>true</fail>
  615. </configuration>
  616. </execution>
  617. </executions>
  618. </plugin>
  619. <plugin>
  620. <groupId>org.apache.maven.plugins</groupId>
  621. <artifactId>maven-antrun-plugin</artifactId>
  622. <executions>
  623. <execution>
  624. <id>kdc</id>
  625. <phase>compile</phase>
  626. <goals>
  627. <goal>run</goal>
  628. </goals>
  629. <configuration>
  630. <target>
  631. <chmod file="${kdc.resource.dir}/killKdc.sh" perm="775" />
  632. <exec dir="${kdc.resource.dir}" executable= "./killKdc.sh" />
  633. <mkdir dir="${project.build.directory}/test-classes/kdc/downloads"/>
  634. <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"/>
  635. <untar src="${project.build.directory}/test-classes/kdc/downloads/apacheds-1.5.7.tar.gz" dest="${project.build.directory}/test-classes/kdc" compression="gzip" />
  636. <copy file="${kdc.resource.dir}/server.xml" toDir="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/conf"/>
  637. <mkdir dir="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/ldif"/>
  638. <copy toDir="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/ldif">
  639. <fileset dir="${kdc.resource.dir}/ldif"/>
  640. </copy>
  641. <chmod file="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/apacheds.sh" perm="775" />
  642. <exec dir="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/" executable="./apacheds.sh" spawn="true"/>
  643. </target>
  644. </configuration>
  645. </execution>
  646. <!-- On completion of graceful test phase: closes the ApacheDS KDC server -->
  647. <execution>
  648. <id>killKdc</id>
  649. <phase>test</phase>
  650. <goals>
  651. <goal>run</goal>
  652. </goals>
  653. <configuration>
  654. <target>
  655. <chmod file="${kdc.resource.dir}/killKdc.sh" perm="775" />
  656. <exec dir="${kdc.resource.dir}" executable= "./killKdc.sh" />
  657. </target>
  658. </configuration>
  659. </execution>
  660. </executions>
  661. </plugin>
  662. </plugins>
  663. </build>
  664. </profile>
  665. </profiles>
  666. </project>