pom.xml 18 KB

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