pom.xml 21 KB

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