pom.xml 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544
  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>3.0.0-SNAPSHOT</version>
  22. <relativePath>../../hadoop-project</relativePath>
  23. </parent>
  24. <groupId>org.apache.hadoop</groupId>
  25. <artifactId>hadoop-hdfs-httpfs</artifactId>
  26. <version>3.0.0-SNAPSHOT</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>org.eclipse.jdt</groupId>
  146. <artifactId>core</artifactId>
  147. </exclusion>
  148. <exclusion>
  149. <groupId>commons-el</groupId>
  150. <artifactId>commons-el</artifactId>
  151. </exclusion>
  152. </exclusions>
  153. </dependency>
  154. <dependency>
  155. <groupId>org.apache.hadoop</groupId>
  156. <artifactId>hadoop-hdfs</artifactId>
  157. <scope>compile</scope>
  158. <exclusions>
  159. <exclusion>
  160. <groupId>commons-cli</groupId>
  161. <artifactId>commons-cli</artifactId>
  162. </exclusion>
  163. <exclusion>
  164. <groupId>commons-httpclient</groupId>
  165. <artifactId>commons-httpclient</artifactId>
  166. </exclusion>
  167. <exclusion>
  168. <groupId>tomcat</groupId>
  169. <artifactId>jasper-compiler</artifactId>
  170. </exclusion>
  171. <exclusion>
  172. <groupId>tomcat</groupId>
  173. <artifactId>jasper-runtime</artifactId>
  174. </exclusion>
  175. <exclusion>
  176. <groupId>javax.servlet</groupId>
  177. <artifactId>servlet-api</artifactId>
  178. </exclusion>
  179. <exclusion>
  180. <groupId>javax.servlet</groupId>
  181. <artifactId>jsp-api</artifactId>
  182. </exclusion>
  183. <exclusion>
  184. <groupId>javax.servlet.jsp</groupId>
  185. <artifactId>jsp-api</artifactId>
  186. </exclusion>
  187. <exclusion>
  188. <groupId>org.mortbay.jetty</groupId>
  189. <artifactId>jetty</artifactId>
  190. </exclusion>
  191. <exclusion>
  192. <groupId>org.mortbay.jetty</groupId>
  193. <artifactId>jetty-util</artifactId>
  194. </exclusion>
  195. <exclusion>
  196. <groupId>org.mortbay.jetty</groupId>
  197. <artifactId>jsp-api-2.1</artifactId>
  198. </exclusion>
  199. <exclusion>
  200. <groupId>org.mortbay.jetty</groupId>
  201. <artifactId>servlet-api-2.5</artifactId>
  202. </exclusion>
  203. <exclusion>
  204. <groupId>net.java.dev.jets3t</groupId>
  205. <artifactId>jets3t</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. <!-- workaround for filtered/unfiltered resources in same directory -->
  265. <!-- remove when maven-eclipse-plugin 2.9 is available -->
  266. <groupId>org.apache.maven.plugins</groupId>
  267. <artifactId>maven-eclipse-plugin</artifactId>
  268. <version>2.6</version>
  269. </plugin>
  270. <plugin>
  271. <groupId>org.apache.maven.plugins</groupId>
  272. <artifactId>maven-surefire-plugin</artifactId>
  273. <configuration>
  274. <threadCount>1</threadCount>
  275. </configuration>
  276. </plugin>
  277. <plugin>
  278. <groupId>org.apache.maven.plugins</groupId>
  279. <artifactId>maven-javadoc-plugin</artifactId>
  280. <executions>
  281. <execution>
  282. <goals>
  283. <goal>javadoc</goal>
  284. </goals>
  285. <phase>site</phase>
  286. <configuration>
  287. <linksource>true</linksource>
  288. <quiet>true</quiet>
  289. <verbose>false</verbose>
  290. <source>${maven.compile.source}</source>
  291. <charset>${maven.compile.encoding}</charset>
  292. <groups>
  293. <group>
  294. <title>HttpFs API</title>
  295. <packages>*</packages>
  296. </group>
  297. </groups>
  298. </configuration>
  299. </execution>
  300. </executions>
  301. </plugin>
  302. <plugin>
  303. <groupId>org.apache.maven.plugins</groupId>
  304. <artifactId>maven-project-info-reports-plugin</artifactId>
  305. <executions>
  306. <execution>
  307. <configuration>
  308. <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
  309. </configuration>
  310. <goals>
  311. <goal>dependencies</goal>
  312. </goals>
  313. <phase>site</phase>
  314. </execution>
  315. </executions>
  316. </plugin>
  317. <plugin>
  318. <groupId>org.apache.rat</groupId>
  319. <artifactId>apache-rat-plugin</artifactId>
  320. <configuration>
  321. <excludes>
  322. </excludes>
  323. </configuration>
  324. </plugin>
  325. <plugin>
  326. <groupId>org.apache.maven.plugins</groupId>
  327. <artifactId>maven-antrun-plugin</artifactId>
  328. <executions>
  329. <execution>
  330. <id>create-web-xmls</id>
  331. <phase>generate-test-resources</phase>
  332. <goals>
  333. <goal>run</goal>
  334. </goals>
  335. <configuration>
  336. <target>
  337. <mkdir dir="${project.build.directory}/test-classes/webapp"/>
  338. <copy todir="${project.build.directory}/test-classes/webapp">
  339. <fileset dir="${basedir}/src/main/webapp"/>
  340. </copy>
  341. </target>
  342. </configuration>
  343. </execution>
  344. <execution>
  345. <id>site</id>
  346. <phase>site</phase>
  347. <goals>
  348. <goal>run</goal>
  349. </goals>
  350. <configuration>
  351. <target>
  352. <xslt in="${basedir}/src/main/resources/httpfs-default.xml"
  353. out="${project.build.directory}/site/httpfs-default.html"
  354. style="${basedir}/src/site/configuration.xsl"/>
  355. </target>
  356. </configuration>
  357. </execution>
  358. </executions>
  359. </plugin>
  360. <plugin>
  361. <groupId>org.apache.maven.plugins</groupId>
  362. <artifactId>maven-war-plugin</artifactId>
  363. <executions>
  364. <execution>
  365. <id>default-war</id>
  366. <phase>package</phase>
  367. <goals>
  368. <goal>war</goal>
  369. </goals>
  370. <configuration>
  371. <warName>webhdfs</warName>
  372. <webappDirectory>${project.build.directory}/webhdfs</webappDirectory>
  373. </configuration>
  374. </execution>
  375. </executions>
  376. </plugin>
  377. <plugin>
  378. <groupId>org.codehaus.mojo</groupId>
  379. <artifactId>findbugs-maven-plugin</artifactId>
  380. <configuration>
  381. <excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml</excludeFilterFile>
  382. </configuration>
  383. </plugin>
  384. </plugins>
  385. </build>
  386. <profiles>
  387. <profile>
  388. <id>docs</id>
  389. <activation>
  390. <activeByDefault>false</activeByDefault>
  391. </activation>
  392. <build>
  393. <plugins>
  394. <plugin>
  395. <groupId>org.apache.maven.plugins</groupId>
  396. <artifactId>maven-site-plugin</artifactId>
  397. <executions>
  398. <execution>
  399. <id>docs</id>
  400. <phase>prepare-package</phase>
  401. <goals>
  402. <goal>site</goal>
  403. </goals>
  404. </execution>
  405. </executions>
  406. </plugin>
  407. </plugins>
  408. </build>
  409. </profile>
  410. <profile>
  411. <id>dist</id>
  412. <activation>
  413. <activeByDefault>false</activeByDefault>
  414. </activation>
  415. <build>
  416. <plugins>
  417. <plugin>
  418. <groupId>org.apache.maven.plugins</groupId>
  419. <artifactId>maven-assembly-plugin</artifactId>
  420. <dependencies>
  421. <dependency>
  422. <groupId>org.apache.hadoop</groupId>
  423. <artifactId>hadoop-assemblies</artifactId>
  424. <version>${project.version}</version>
  425. </dependency>
  426. </dependencies>
  427. <executions>
  428. <execution>
  429. <id>dist</id>
  430. <phase>package</phase>
  431. <goals>
  432. <goal>single</goal>
  433. </goals>
  434. <configuration>
  435. <finalName>${project.artifactId}-${project.version}</finalName>
  436. <appendAssemblyId>false</appendAssemblyId>
  437. <attach>false</attach>
  438. <descriptorRefs>
  439. <descriptorRef>hadoop-httpfs-dist</descriptorRef>
  440. </descriptorRefs>
  441. </configuration>
  442. </execution>
  443. </executions>
  444. </plugin>
  445. <!-- Downloading Tomcat TAR.GZ, using downloads/ dir to avoid downloading over an over -->
  446. <plugin>
  447. <groupId>org.apache.maven.plugins</groupId>
  448. <artifactId>maven-antrun-plugin</artifactId>
  449. <executions>
  450. <execution>
  451. <id>dist</id>
  452. <goals>
  453. <goal>run</goal>
  454. </goals>
  455. <phase>package</phase>
  456. <configuration>
  457. <target>
  458. <mkdir dir="downloads"/>
  459. <get
  460. src="http://archive.apache.org/dist/tomcat/tomcat-6/v${tomcat.version}/bin/apache-tomcat-${tomcat.version}.tar.gz"
  461. dest="downloads/tomcat.tar.gz" verbose="true" skipexisting="true"/>
  462. <delete dir="${project.build.directory}/tomcat.exp"/>
  463. <mkdir dir="${project.build.directory}/tomcat.exp"/>
  464. <!-- Using Unix script to preserve file permissions -->
  465. <echo file="${project.build.directory}/tomcat-untar.sh">
  466. which cygpath 2&gt; /dev/null
  467. if [ $? = 1 ]; then
  468. BUILD_DIR="${project.build.directory}"
  469. else
  470. BUILD_DIR=`cygpath --unix '${project.build.directory}'`
  471. fi
  472. cd $BUILD_DIR/tomcat.exp
  473. tar xzf ${basedir}/downloads/tomcat.tar.gz
  474. </echo>
  475. <exec executable="sh" dir="${project.build.directory}" failonerror="true">
  476. <arg line="./tomcat-untar.sh"/>
  477. </exec>
  478. <move file="${project.build.directory}/tomcat.exp/apache-tomcat-${tomcat.version}"
  479. tofile="${httpfs.tomcat.dist.dir}"/>
  480. <delete dir="${project.build.directory}/tomcat.exp"/>
  481. <delete dir="${httpfs.tomcat.dist.dir}/webapps"/>
  482. <mkdir dir="${httpfs.tomcat.dist.dir}/webapps"/>
  483. <delete file="${httpfs.tomcat.dist.dir}/conf/server.xml"/>
  484. <copy file="${basedir}/src/main/tomcat/server.xml"
  485. toDir="${httpfs.tomcat.dist.dir}/conf"/>
  486. <copy file="${basedir}/src/main/tomcat/logging.properties"
  487. toDir="${httpfs.tomcat.dist.dir}/conf"/>
  488. <copy toDir="${httpfs.tomcat.dist.dir}/webapps/ROOT">
  489. <fileset dir="${basedir}/src/main/tomcat/ROOT"/>
  490. </copy>
  491. <copy toDir="${httpfs.tomcat.dist.dir}/webapps/webhdfs">
  492. <fileset dir="${project.build.directory}/webhdfs"/>
  493. </copy>
  494. </target>
  495. </configuration>
  496. </execution>
  497. <execution>
  498. <id>tar</id>
  499. <phase>package</phase>
  500. <goals>
  501. <goal>run</goal>
  502. </goals>
  503. <configuration>
  504. <target if="tar">
  505. <!-- Using Unix script to preserve symlinks -->
  506. <echo file="${project.build.directory}/dist-maketar.sh">
  507. which cygpath 2&gt; /dev/null
  508. if [ $? = 1 ]; then
  509. BUILD_DIR="${project.build.directory}"
  510. else
  511. BUILD_DIR=`cygpath --unix '${project.build.directory}'`
  512. fi
  513. cd $BUILD_DIR
  514. tar czf ${project.artifactId}-${project.version}.tar.gz ${project.artifactId}-${project.version}
  515. </echo>
  516. <exec executable="sh" dir="${project.build.directory}" failonerror="true">
  517. <arg line="./dist-maketar.sh"/>
  518. </exec>
  519. </target>
  520. </configuration>
  521. </execution>
  522. </executions>
  523. </plugin>
  524. </plugins>
  525. </build>
  526. </profile>
  527. </profiles>
  528. </project>