pom.xml 27 KB

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