pom.xml 19 KB

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