pom.xml 21 KB

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