pom.xml 21 KB

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