pom.xml 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599
  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.
  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</artifactId>
  21. <version>2.0.3-SNAPSHOT</version>
  22. <relativePath>../../hadoop-project</relativePath>
  23. </parent>
  24. <groupId>org.apache.hadoop</groupId>
  25. <artifactId>hadoop-hdfs-httpfs</artifactId>
  26. <version>2.0.3-SNAPSHOT</version>
  27. <packaging>war</packaging>
  28. <name>Apache Hadoop HttpFS</name>
  29. <description>Apache Hadoop HttpFS</description>
  30. <properties>
  31. <tomcat.version>6.0.32</tomcat.version>
  32. <httpfs.source.repository>REPO NOT AVAIL</httpfs.source.repository>
  33. <httpfs.source.repository>REPO NOT AVAIL</httpfs.source.repository>
  34. <httpfs.source.revision>REVISION NOT AVAIL</httpfs.source.revision>
  35. <maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ssZ</maven.build.timestamp.format>
  36. <httpfs.build.timestamp>${maven.build.timestamp}</httpfs.build.timestamp>
  37. <httpfs.tomcat.dist.dir>
  38. ${project.build.directory}/${project.artifactId}-${project.version}/share/hadoop/httpfs/tomcat
  39. </httpfs.tomcat.dist.dir>
  40. <kerberos.realm>LOCALHOST</kerberos.realm>
  41. <test.exclude.kerberos.test>**/TestHttpFSWithKerberos.java</test.exclude.kerberos.test>
  42. <tomcat.download.url>http://archive.apache.org/dist/tomcat/tomcat-6/v${tomcat.version}/bin/apache-tomcat-${tomcat.version}.tar.gz</tomcat.download.url>
  43. </properties>
  44. <dependencies>
  45. <dependency>
  46. <groupId>junit</groupId>
  47. <artifactId>junit</artifactId>
  48. <scope>test</scope>
  49. </dependency>
  50. <dependency>
  51. <groupId>org.mockito</groupId>
  52. <artifactId>mockito-all</artifactId>
  53. <scope>test</scope>
  54. </dependency>
  55. <dependency>
  56. <groupId>org.apache.hadoop</groupId>
  57. <artifactId>hadoop-auth</artifactId>
  58. <scope>compile</scope>
  59. </dependency>
  60. <dependency>
  61. <groupId>com.sun.jersey</groupId>
  62. <artifactId>jersey-core</artifactId>
  63. <scope>compile</scope>
  64. </dependency>
  65. <dependency>
  66. <groupId>com.sun.jersey</groupId>
  67. <artifactId>jersey-server</artifactId>
  68. <scope>compile</scope>
  69. </dependency>
  70. <dependency>
  71. <groupId>javax.servlet</groupId>
  72. <artifactId>servlet-api</artifactId>
  73. <scope>provided</scope>
  74. </dependency>
  75. <dependency>
  76. <groupId>com.google.guava</groupId>
  77. <artifactId>guava</artifactId>
  78. <scope>compile</scope>
  79. </dependency>
  80. <dependency>
  81. <groupId>com.googlecode.json-simple</groupId>
  82. <artifactId>json-simple</artifactId>
  83. <scope>compile</scope>
  84. </dependency>
  85. <dependency>
  86. <groupId>org.mortbay.jetty</groupId>
  87. <artifactId>jetty</artifactId>
  88. <scope>test</scope>
  89. </dependency>
  90. <dependency>
  91. <groupId>org.apache.hadoop</groupId>
  92. <artifactId>hadoop-common</artifactId>
  93. <scope>compile</scope>
  94. <exclusions>
  95. <exclusion>
  96. <groupId>javax.xml.stream</groupId>
  97. <artifactId>stax-api</artifactId>
  98. </exclusion>
  99. <exclusion>
  100. <groupId>commons-httpclient</groupId>
  101. <artifactId>commons-httpclient</artifactId>
  102. </exclusion>
  103. <exclusion>
  104. <groupId>tomcat</groupId>
  105. <artifactId>jasper-compiler</artifactId>
  106. </exclusion>
  107. <exclusion>
  108. <groupId>tomcat</groupId>
  109. <artifactId>jasper-runtime</artifactId>
  110. </exclusion>
  111. <exclusion>
  112. <groupId>javax.servlet</groupId>
  113. <artifactId>servlet-api</artifactId>
  114. </exclusion>
  115. <exclusion>
  116. <groupId>javax.servlet</groupId>
  117. <artifactId>jsp-api</artifactId>
  118. </exclusion>
  119. <exclusion>
  120. <groupId>javax.servlet.jsp</groupId>
  121. <artifactId>jsp-api</artifactId>
  122. </exclusion>
  123. <exclusion>
  124. <groupId>org.mortbay.jetty</groupId>
  125. <artifactId>jetty</artifactId>
  126. </exclusion>
  127. <exclusion>
  128. <groupId>org.mortbay.jetty</groupId>
  129. <artifactId>jetty-util</artifactId>
  130. </exclusion>
  131. <exclusion>
  132. <groupId>org.mortbay.jetty</groupId>
  133. <artifactId>jsp-api-2.1</artifactId>
  134. </exclusion>
  135. <exclusion>
  136. <groupId>org.mortbay.jetty</groupId>
  137. <artifactId>servlet-api-2.5</artifactId>
  138. </exclusion>
  139. <exclusion>
  140. <groupId>net.java.dev.jets3t</groupId>
  141. <artifactId>jets3t</artifactId>
  142. </exclusion>
  143. <exclusion>
  144. <groupId>org.eclipse.jdt</groupId>
  145. <artifactId>core</artifactId>
  146. </exclusion>
  147. <exclusion>
  148. <groupId>commons-el</groupId>
  149. <artifactId>commons-el</artifactId>
  150. </exclusion>
  151. </exclusions>
  152. </dependency>
  153. <dependency>
  154. <groupId>org.apache.hadoop</groupId>
  155. <artifactId>hadoop-hdfs</artifactId>
  156. <scope>compile</scope>
  157. <exclusions>
  158. <exclusion>
  159. <groupId>commons-cli</groupId>
  160. <artifactId>commons-cli</artifactId>
  161. </exclusion>
  162. <exclusion>
  163. <groupId>commons-httpclient</groupId>
  164. <artifactId>commons-httpclient</artifactId>
  165. </exclusion>
  166. <exclusion>
  167. <groupId>tomcat</groupId>
  168. <artifactId>jasper-compiler</artifactId>
  169. </exclusion>
  170. <exclusion>
  171. <groupId>tomcat</groupId>
  172. <artifactId>jasper-runtime</artifactId>
  173. </exclusion>
  174. <exclusion>
  175. <groupId>javax.servlet</groupId>
  176. <artifactId>servlet-api</artifactId>
  177. </exclusion>
  178. <exclusion>
  179. <groupId>javax.servlet</groupId>
  180. <artifactId>jsp-api</artifactId>
  181. </exclusion>
  182. <exclusion>
  183. <groupId>javax.servlet.jsp</groupId>
  184. <artifactId>jsp-api</artifactId>
  185. </exclusion>
  186. <exclusion>
  187. <groupId>org.mortbay.jetty</groupId>
  188. <artifactId>jetty</artifactId>
  189. </exclusion>
  190. <exclusion>
  191. <groupId>org.mortbay.jetty</groupId>
  192. <artifactId>jetty-util</artifactId>
  193. </exclusion>
  194. <exclusion>
  195. <groupId>org.mortbay.jetty</groupId>
  196. <artifactId>jsp-api-2.1</artifactId>
  197. </exclusion>
  198. <exclusion>
  199. <groupId>org.mortbay.jetty</groupId>
  200. <artifactId>servlet-api-2.5</artifactId>
  201. </exclusion>
  202. <exclusion>
  203. <groupId>net.java.dev.jets3t</groupId>
  204. <artifactId>jets3t</artifactId>
  205. </exclusion>
  206. <exclusion>
  207. <groupId>org.eclipse.jdt</groupId>
  208. <artifactId>core</artifactId>
  209. </exclusion>
  210. <exclusion>
  211. <groupId>commons-el</groupId>
  212. <artifactId>commons-el</artifactId>
  213. </exclusion>
  214. </exclusions>
  215. </dependency>
  216. <dependency>
  217. <groupId>org.apache.hadoop</groupId>
  218. <artifactId>hadoop-common</artifactId>
  219. <scope>test</scope>
  220. <type>test-jar</type>
  221. </dependency>
  222. <dependency>
  223. <groupId>org.apache.hadoop</groupId>
  224. <artifactId>hadoop-hdfs</artifactId>
  225. <scope>test</scope>
  226. <type>test-jar</type>
  227. </dependency>
  228. <dependency>
  229. <groupId>log4j</groupId>
  230. <artifactId>log4j</artifactId>
  231. <scope>compile</scope>
  232. </dependency>
  233. <dependency>
  234. <groupId>org.slf4j</groupId>
  235. <artifactId>slf4j-api</artifactId>
  236. <scope>compile</scope>
  237. </dependency>
  238. <dependency>
  239. <groupId>org.slf4j</groupId>
  240. <artifactId>slf4j-log4j12</artifactId>
  241. <scope>runtime</scope>
  242. </dependency>
  243. </dependencies>
  244. <build>
  245. <resources>
  246. <resource>
  247. <directory>src/main/resources</directory>
  248. <filtering>true</filtering>
  249. <includes>
  250. <include>httpfs.properties</include>
  251. </includes>
  252. </resource>
  253. <resource>
  254. <directory>src/main/resources</directory>
  255. <filtering>false</filtering>
  256. <excludes>
  257. <exclude>httpfs.properties</exclude>
  258. </excludes>
  259. </resource>
  260. </resources>
  261. <testResources>
  262. <testResource>
  263. <directory>${basedir}/src/test/resources</directory>
  264. <filtering>false</filtering>
  265. <excludes>
  266. <exclude>krb5.conf</exclude>
  267. </excludes>
  268. </testResource>
  269. <testResource>
  270. <directory>${basedir}/src/test/resources</directory>
  271. <filtering>true</filtering>
  272. <includes>
  273. <include>krb5.conf</include>
  274. </includes>
  275. </testResource>
  276. </testResources>
  277. <plugins>
  278. <plugin>
  279. <!-- workaround for filtered/unfiltered resources in same directory -->
  280. <!-- remove when maven-eclipse-plugin 2.9 is available -->
  281. <groupId>org.apache.maven.plugins</groupId>
  282. <artifactId>maven-eclipse-plugin</artifactId>
  283. <version>2.6</version>
  284. </plugin>
  285. <plugin>
  286. <groupId>org.apache.maven.plugins</groupId>
  287. <artifactId>maven-surefire-plugin</artifactId>
  288. <configuration>
  289. <threadCount>1</threadCount>
  290. <forkedProcessTimeoutInSeconds>600</forkedProcessTimeoutInSeconds>
  291. <systemPropertyVariables>
  292. <java.security.krb5.conf>${project.build.directory}/test-classes/krb5.conf</java.security.krb5.conf>
  293. <kerberos.realm>${kerberos.realm}</kerberos.realm>
  294. </systemPropertyVariables>
  295. <excludes>
  296. <exclude>**/${test.exclude}.java</exclude>
  297. <exclude>${test.exclude.pattern}</exclude>
  298. <exclude>${test.exclude.kerberos.test}</exclude>
  299. </excludes>
  300. </configuration>
  301. </plugin>
  302. <plugin>
  303. <groupId>org.apache.maven.plugins</groupId>
  304. <artifactId>maven-javadoc-plugin</artifactId>
  305. <executions>
  306. <execution>
  307. <goals>
  308. <goal>javadoc</goal>
  309. </goals>
  310. <phase>site</phase>
  311. <configuration>
  312. <linksource>true</linksource>
  313. <quiet>true</quiet>
  314. <verbose>false</verbose>
  315. <source>${maven.compile.source}</source>
  316. <charset>${maven.compile.encoding}</charset>
  317. <groups>
  318. <group>
  319. <title>HttpFs API</title>
  320. <packages>*</packages>
  321. </group>
  322. </groups>
  323. </configuration>
  324. </execution>
  325. </executions>
  326. </plugin>
  327. <plugin>
  328. <groupId>org.apache.maven.plugins</groupId>
  329. <artifactId>maven-project-info-reports-plugin</artifactId>
  330. <executions>
  331. <execution>
  332. <configuration>
  333. <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
  334. </configuration>
  335. <goals>
  336. <goal>dependencies</goal>
  337. </goals>
  338. <phase>site</phase>
  339. </execution>
  340. </executions>
  341. </plugin>
  342. <plugin>
  343. <groupId>org.apache.rat</groupId>
  344. <artifactId>apache-rat-plugin</artifactId>
  345. <configuration>
  346. <excludes>
  347. </excludes>
  348. </configuration>
  349. </plugin>
  350. <plugin>
  351. <groupId>org.apache.maven.plugins</groupId>
  352. <artifactId>maven-antrun-plugin</artifactId>
  353. <executions>
  354. <execution>
  355. <id>create-web-xmls</id>
  356. <phase>generate-test-resources</phase>
  357. <goals>
  358. <goal>run</goal>
  359. </goals>
  360. <configuration>
  361. <target>
  362. <mkdir dir="${project.build.directory}/test-classes/webapp"/>
  363. <copy todir="${project.build.directory}/test-classes/webapp">
  364. <fileset dir="${basedir}/src/main/webapp"/>
  365. </copy>
  366. </target>
  367. </configuration>
  368. </execution>
  369. <execution>
  370. <id>site</id>
  371. <phase>site</phase>
  372. <goals>
  373. <goal>run</goal>
  374. </goals>
  375. <configuration>
  376. <target>
  377. <xslt in="${basedir}/src/main/resources/httpfs-default.xml"
  378. out="${project.build.directory}/site/httpfs-default.html"
  379. style="${basedir}/src/site/configuration.xsl"/>
  380. </target>
  381. </configuration>
  382. </execution>
  383. </executions>
  384. </plugin>
  385. <plugin>
  386. <groupId>org.apache.maven.plugins</groupId>
  387. <artifactId>maven-war-plugin</artifactId>
  388. <executions>
  389. <execution>
  390. <id>default-war</id>
  391. <phase>package</phase>
  392. <goals>
  393. <goal>war</goal>
  394. </goals>
  395. <configuration>
  396. <warName>webhdfs</warName>
  397. <webappDirectory>${project.build.directory}/webhdfs</webappDirectory>
  398. </configuration>
  399. </execution>
  400. </executions>
  401. </plugin>
  402. <plugin>
  403. <groupId>org.codehaus.mojo</groupId>
  404. <artifactId>findbugs-maven-plugin</artifactId>
  405. <configuration>
  406. <excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml</excludeFilterFile>
  407. </configuration>
  408. </plugin>
  409. </plugins>
  410. </build>
  411. <profiles>
  412. <profile>
  413. <id>testKerberos</id>
  414. <activation>
  415. <activeByDefault>false</activeByDefault>
  416. </activation>
  417. <properties>
  418. <test.exclude.kerberos.test>_</test.exclude.kerberos.test>
  419. </properties>
  420. <build>
  421. <plugins>
  422. <plugin>
  423. <groupId>org.apache.maven.plugins</groupId>
  424. <artifactId>maven-surefire-plugin</artifactId>
  425. <configuration>
  426. <forkMode>once</forkMode>
  427. <forkedProcessTimeoutInSeconds>600</forkedProcessTimeoutInSeconds>
  428. <systemPropertyVariables>
  429. <java.security.krb5.conf>${project.build.directory}/test-classes/krb5.conf</java.security.krb5.conf>
  430. <kerberos.realm>${kerberos.realm}</kerberos.realm>
  431. <httpfs.http.hostname>localhost</httpfs.http.hostname>
  432. </systemPropertyVariables>
  433. <includes>
  434. <include>**/TestHttpFSWithKerberos.java</include>
  435. </includes>
  436. </configuration>
  437. </plugin>
  438. </plugins>
  439. </build>
  440. </profile>
  441. <profile>
  442. <id>docs</id>
  443. <activation>
  444. <activeByDefault>false</activeByDefault>
  445. </activation>
  446. <build>
  447. <plugins>
  448. <plugin>
  449. <groupId>org.apache.maven.plugins</groupId>
  450. <artifactId>maven-site-plugin</artifactId>
  451. <executions>
  452. <execution>
  453. <id>docs</id>
  454. <phase>prepare-package</phase>
  455. <goals>
  456. <goal>site</goal>
  457. </goals>
  458. </execution>
  459. </executions>
  460. </plugin>
  461. </plugins>
  462. </build>
  463. </profile>
  464. <profile>
  465. <id>dist</id>
  466. <activation>
  467. <activeByDefault>false</activeByDefault>
  468. </activation>
  469. <build>
  470. <plugins>
  471. <plugin>
  472. <groupId>org.apache.maven.plugins</groupId>
  473. <artifactId>maven-assembly-plugin</artifactId>
  474. <dependencies>
  475. <dependency>
  476. <groupId>org.apache.hadoop</groupId>
  477. <artifactId>hadoop-assemblies</artifactId>
  478. <version>${project.version}</version>
  479. </dependency>
  480. </dependencies>
  481. <executions>
  482. <execution>
  483. <id>dist</id>
  484. <phase>package</phase>
  485. <goals>
  486. <goal>single</goal>
  487. </goals>
  488. <configuration>
  489. <finalName>${project.artifactId}-${project.version}</finalName>
  490. <appendAssemblyId>false</appendAssemblyId>
  491. <attach>false</attach>
  492. <descriptorRefs>
  493. <descriptorRef>hadoop-httpfs-dist</descriptorRef>
  494. </descriptorRefs>
  495. </configuration>
  496. </execution>
  497. </executions>
  498. </plugin>
  499. <!-- Downloading Tomcat TAR.GZ, using downloads/ dir to avoid downloading over an over -->
  500. <plugin>
  501. <groupId>org.apache.maven.plugins</groupId>
  502. <artifactId>maven-antrun-plugin</artifactId>
  503. <executions>
  504. <execution>
  505. <id>dist</id>
  506. <goals>
  507. <goal>run</goal>
  508. </goals>
  509. <phase>package</phase>
  510. <configuration>
  511. <target>
  512. <mkdir dir="downloads"/>
  513. <get
  514. src="${tomcat.download.url}"
  515. dest="downloads/tomcat.tar.gz" verbose="true" skipexisting="true"/>
  516. <delete dir="${project.build.directory}/tomcat.exp"/>
  517. <mkdir dir="${project.build.directory}/tomcat.exp"/>
  518. <!-- Using Unix script to preserve file permissions -->
  519. <echo file="${project.build.directory}/tomcat-untar.sh">
  520. which cygpath 2&gt; /dev/null
  521. if [ $? = 1 ]; then
  522. BUILD_DIR="${project.build.directory}"
  523. else
  524. BUILD_DIR=`cygpath --unix '${project.build.directory}'`
  525. fi
  526. cd $BUILD_DIR/tomcat.exp
  527. tar xzf ${basedir}/downloads/tomcat.tar.gz
  528. </echo>
  529. <exec executable="sh" dir="${project.build.directory}" failonerror="true">
  530. <arg line="./tomcat-untar.sh"/>
  531. </exec>
  532. <move file="${project.build.directory}/tomcat.exp/apache-tomcat-${tomcat.version}"
  533. tofile="${httpfs.tomcat.dist.dir}"/>
  534. <delete dir="${project.build.directory}/tomcat.exp"/>
  535. <delete dir="${httpfs.tomcat.dist.dir}/webapps"/>
  536. <mkdir dir="${httpfs.tomcat.dist.dir}/webapps"/>
  537. <delete file="${httpfs.tomcat.dist.dir}/conf/server.xml"/>
  538. <copy file="${basedir}/src/main/tomcat/server.xml"
  539. toDir="${httpfs.tomcat.dist.dir}/conf"/>
  540. <copy file="${basedir}/src/main/tomcat/logging.properties"
  541. toDir="${httpfs.tomcat.dist.dir}/conf"/>
  542. <copy toDir="${httpfs.tomcat.dist.dir}/webapps/ROOT">
  543. <fileset dir="${basedir}/src/main/tomcat/ROOT"/>
  544. </copy>
  545. <copy toDir="${httpfs.tomcat.dist.dir}/webapps/webhdfs">
  546. <fileset dir="${project.build.directory}/webhdfs"/>
  547. </copy>
  548. </target>
  549. </configuration>
  550. </execution>
  551. <execution>
  552. <id>tar</id>
  553. <phase>package</phase>
  554. <goals>
  555. <goal>run</goal>
  556. </goals>
  557. <configuration>
  558. <target if="tar">
  559. <!-- Using Unix script to preserve symlinks -->
  560. <echo file="${project.build.directory}/dist-maketar.sh">
  561. which cygpath 2&gt; /dev/null
  562. if [ $? = 1 ]; then
  563. BUILD_DIR="${project.build.directory}"
  564. else
  565. BUILD_DIR=`cygpath --unix '${project.build.directory}'`
  566. fi
  567. cd $BUILD_DIR
  568. tar czf ${project.artifactId}-${project.version}.tar.gz ${project.artifactId}-${project.version}
  569. </echo>
  570. <exec executable="sh" dir="${project.build.directory}" failonerror="true">
  571. <arg line="./dist-maketar.sh"/>
  572. </exec>
  573. </target>
  574. </configuration>
  575. </execution>
  576. </executions>
  577. </plugin>
  578. </plugins>
  579. </build>
  580. </profile>
  581. </profiles>
  582. </project>