pom.xml 19 KB

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