pom.xml 21 KB

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