pom.xml 18 KB

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