pom.xml 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594
  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.1.2-SNAPSHOT</version>
  22. <relativePath>../../hadoop-project</relativePath>
  23. </parent>
  24. <groupId>org.apache.hadoop</groupId>
  25. <artifactId>hadoop-hdfs-httpfs</artifactId>
  26. <version>2.1.2-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.36</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. <properties>
  296. <property>
  297. <name>listener</name>
  298. <value>org.apache.hadoop.test.TimedOutTestsListener</value>
  299. </property>
  300. </properties>
  301. <excludes>
  302. <exclude>**/${test.exclude}.java</exclude>
  303. <exclude>${test.exclude.pattern}</exclude>
  304. <exclude>${test.exclude.kerberos.test}</exclude>
  305. </excludes>
  306. </configuration>
  307. </plugin>
  308. <plugin>
  309. <groupId>org.apache.maven.plugins</groupId>
  310. <artifactId>maven-javadoc-plugin</artifactId>
  311. <executions>
  312. <execution>
  313. <goals>
  314. <goal>javadoc</goal>
  315. </goals>
  316. <phase>site</phase>
  317. <configuration>
  318. <linksource>true</linksource>
  319. <quiet>true</quiet>
  320. <verbose>false</verbose>
  321. <source>${maven.compile.source}</source>
  322. <charset>${maven.compile.encoding}</charset>
  323. <groups>
  324. <group>
  325. <title>HttpFs API</title>
  326. <packages>*</packages>
  327. </group>
  328. </groups>
  329. </configuration>
  330. </execution>
  331. </executions>
  332. </plugin>
  333. <plugin>
  334. <groupId>org.apache.maven.plugins</groupId>
  335. <artifactId>maven-project-info-reports-plugin</artifactId>
  336. <executions>
  337. <execution>
  338. <configuration>
  339. <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
  340. </configuration>
  341. <goals>
  342. <goal>dependencies</goal>
  343. </goals>
  344. <phase>site</phase>
  345. </execution>
  346. </executions>
  347. </plugin>
  348. <plugin>
  349. <groupId>org.apache.rat</groupId>
  350. <artifactId>apache-rat-plugin</artifactId>
  351. <configuration>
  352. <excludes>
  353. <exclude>src/test/resources/classutils.txt</exclude>
  354. <exclude>src/main/conf/httpfs-signature.secret</exclude>
  355. </excludes>
  356. </configuration>
  357. </plugin>
  358. <plugin>
  359. <groupId>org.apache.maven.plugins</groupId>
  360. <artifactId>maven-antrun-plugin</artifactId>
  361. <executions>
  362. <execution>
  363. <id>create-web-xmls</id>
  364. <phase>generate-test-resources</phase>
  365. <goals>
  366. <goal>run</goal>
  367. </goals>
  368. <configuration>
  369. <target>
  370. <mkdir dir="${project.build.directory}/test-classes/webapp"/>
  371. <copy todir="${project.build.directory}/test-classes/webapp">
  372. <fileset dir="${basedir}/src/main/webapp"/>
  373. </copy>
  374. </target>
  375. </configuration>
  376. </execution>
  377. <execution>
  378. <id>site</id>
  379. <phase>site</phase>
  380. <goals>
  381. <goal>run</goal>
  382. </goals>
  383. <configuration>
  384. <target>
  385. <xslt in="${basedir}/src/main/resources/httpfs-default.xml"
  386. out="${project.build.directory}/site/httpfs-default.html"
  387. style="${basedir}/src/site/configuration.xsl"/>
  388. </target>
  389. </configuration>
  390. </execution>
  391. </executions>
  392. </plugin>
  393. <plugin>
  394. <groupId>org.apache.maven.plugins</groupId>
  395. <artifactId>maven-war-plugin</artifactId>
  396. <executions>
  397. <execution>
  398. <id>default-war</id>
  399. <phase>package</phase>
  400. <goals>
  401. <goal>war</goal>
  402. </goals>
  403. <configuration>
  404. <warName>webhdfs</warName>
  405. <webappDirectory>${project.build.directory}/webhdfs</webappDirectory>
  406. </configuration>
  407. </execution>
  408. </executions>
  409. </plugin>
  410. <plugin>
  411. <groupId>org.codehaus.mojo</groupId>
  412. <artifactId>findbugs-maven-plugin</artifactId>
  413. <configuration>
  414. <excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml</excludeFilterFile>
  415. </configuration>
  416. </plugin>
  417. </plugins>
  418. </build>
  419. <profiles>
  420. <profile>
  421. <id>testKerberos</id>
  422. <activation>
  423. <activeByDefault>false</activeByDefault>
  424. </activation>
  425. <properties>
  426. <test.exclude.kerberos.test>_</test.exclude.kerberos.test>
  427. </properties>
  428. <build>
  429. <plugins>
  430. <plugin>
  431. <groupId>org.apache.maven.plugins</groupId>
  432. <artifactId>maven-surefire-plugin</artifactId>
  433. <configuration>
  434. <forkMode>once</forkMode>
  435. <forkedProcessTimeoutInSeconds>600</forkedProcessTimeoutInSeconds>
  436. <systemPropertyVariables>
  437. <java.security.krb5.conf>${project.build.directory}/test-classes/krb5.conf</java.security.krb5.conf>
  438. <kerberos.realm>${kerberos.realm}</kerberos.realm>
  439. <httpfs.http.hostname>localhost</httpfs.http.hostname>
  440. </systemPropertyVariables>
  441. <includes>
  442. <include>**/TestHttpFSWithKerberos.java</include>
  443. </includes>
  444. </configuration>
  445. </plugin>
  446. </plugins>
  447. </build>
  448. </profile>
  449. <profile>
  450. <id>docs</id>
  451. <activation>
  452. <activeByDefault>false</activeByDefault>
  453. </activation>
  454. <build>
  455. <plugins>
  456. <plugin>
  457. <groupId>org.apache.maven.plugins</groupId>
  458. <artifactId>maven-site-plugin</artifactId>
  459. <executions>
  460. <execution>
  461. <id>docs</id>
  462. <phase>prepare-package</phase>
  463. <goals>
  464. <goal>site</goal>
  465. </goals>
  466. </execution>
  467. </executions>
  468. </plugin>
  469. </plugins>
  470. </build>
  471. </profile>
  472. <profile>
  473. <id>dist</id>
  474. <activation>
  475. <activeByDefault>false</activeByDefault>
  476. </activation>
  477. <build>
  478. <plugins>
  479. <plugin>
  480. <groupId>org.apache.maven.plugins</groupId>
  481. <artifactId>maven-assembly-plugin</artifactId>
  482. <dependencies>
  483. <dependency>
  484. <groupId>org.apache.hadoop</groupId>
  485. <artifactId>hadoop-assemblies</artifactId>
  486. <version>${project.version}</version>
  487. </dependency>
  488. </dependencies>
  489. <executions>
  490. <execution>
  491. <id>dist</id>
  492. <phase>package</phase>
  493. <goals>
  494. <goal>single</goal>
  495. </goals>
  496. <configuration>
  497. <finalName>${project.artifactId}-${project.version}</finalName>
  498. <appendAssemblyId>false</appendAssemblyId>
  499. <attach>false</attach>
  500. <descriptorRefs>
  501. <descriptorRef>hadoop-httpfs-dist</descriptorRef>
  502. </descriptorRefs>
  503. </configuration>
  504. </execution>
  505. </executions>
  506. </plugin>
  507. <!-- Downloading Tomcat TAR.GZ, using downloads/ dir to avoid downloading over an over -->
  508. <plugin>
  509. <groupId>org.apache.maven.plugins</groupId>
  510. <artifactId>maven-antrun-plugin</artifactId>
  511. <executions>
  512. <execution>
  513. <id>dist</id>
  514. <goals>
  515. <goal>run</goal>
  516. </goals>
  517. <phase>package</phase>
  518. <configuration>
  519. <target>
  520. <mkdir dir="downloads"/>
  521. <get
  522. src="${tomcat.download.url}"
  523. dest="downloads/apache-tomcat-${tomcat.version}.tar.gz" verbose="true" skipexisting="true"/>
  524. <delete dir="${project.build.directory}/tomcat.exp"/>
  525. <mkdir dir="${project.build.directory}/tomcat.exp"/>
  526. <!-- Using Unix script to preserve file permissions -->
  527. <echo file="${project.build.directory}/tomcat-untar.sh">
  528. cd "${project.build.directory}/tomcat.exp"
  529. gzip -cd ../../downloads/apache-tomcat-${tomcat.version}.tar.gz | tar xf -
  530. </echo>
  531. <exec executable="sh" dir="${project.build.directory}" failonerror="true">
  532. <arg line="./tomcat-untar.sh"/>
  533. </exec>
  534. <move file="${project.build.directory}/tomcat.exp/apache-tomcat-${tomcat.version}"
  535. tofile="${httpfs.tomcat.dist.dir}"/>
  536. <delete dir="${project.build.directory}/tomcat.exp"/>
  537. <delete dir="${httpfs.tomcat.dist.dir}/webapps"/>
  538. <mkdir dir="${httpfs.tomcat.dist.dir}/webapps"/>
  539. <delete file="${httpfs.tomcat.dist.dir}/conf/server.xml"/>
  540. <copy file="${basedir}/src/main/tomcat/server.xml"
  541. toDir="${httpfs.tomcat.dist.dir}/conf"/>
  542. <delete file="${httpfs.tomcat.dist.dir}/conf/logging.properties"/>
  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. cd "${project.build.directory}"
  565. tar cf - ${project.artifactId}-${project.version} | gzip > ${project.artifactId}-${project.version}.tar.gz
  566. </echo>
  567. <exec executable="sh" dir="${project.build.directory}" failonerror="true">
  568. <arg line="./dist-maketar.sh"/>
  569. </exec>
  570. </target>
  571. </configuration>
  572. </execution>
  573. </executions>
  574. </plugin>
  575. </plugins>
  576. </build>
  577. </profile>
  578. </profiles>
  579. </project>