pom.xml 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445
  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-alpha2-SNAPSHOT</version>
  22. <relativePath>../../hadoop-project</relativePath>
  23. </parent>
  24. <artifactId>hadoop-kms</artifactId>
  25. <version>3.0.0-alpha2-SNAPSHOT</version>
  26. <packaging>war</packaging>
  27. <name>Apache Hadoop KMS</name>
  28. <description>Apache Hadoop KMS</description>
  29. <properties>
  30. <kms.tomcat.dist.dir>
  31. ${project.build.directory}/${project.artifactId}-${project.version}/share/hadoop/kms/tomcat
  32. </kms.tomcat.dist.dir>
  33. <tomcat.download.url>
  34. http://archive.apache.org/dist/tomcat/tomcat-6/v${tomcat.version}/bin/apache-tomcat-${tomcat.version}.tar.gz
  35. </tomcat.download.url>
  36. </properties>
  37. <dependencies>
  38. <dependency>
  39. <groupId>org.apache.hadoop</groupId>
  40. <artifactId>hadoop-minikdc</artifactId>
  41. <scope>test</scope>
  42. </dependency>
  43. <dependency>
  44. <groupId>junit</groupId>
  45. <artifactId>junit</artifactId>
  46. <scope>test</scope>
  47. </dependency>
  48. <dependency>
  49. <groupId>org.mockito</groupId>
  50. <artifactId>mockito-all</artifactId>
  51. <scope>test</scope>
  52. </dependency>
  53. <dependency>
  54. <groupId>org.apache.hadoop</groupId>
  55. <artifactId>hadoop-auth</artifactId>
  56. <scope>compile</scope>
  57. </dependency>
  58. <dependency>
  59. <groupId>com.google.guava</groupId>
  60. <artifactId>guava</artifactId>
  61. <scope>compile</scope>
  62. </dependency>
  63. <dependency>
  64. <groupId>com.sun.jersey</groupId>
  65. <artifactId>jersey-core</artifactId>
  66. <scope>compile</scope>
  67. </dependency>
  68. <dependency>
  69. <groupId>com.sun.jersey</groupId>
  70. <artifactId>jersey-server</artifactId>
  71. <scope>compile</scope>
  72. </dependency>
  73. <dependency>
  74. <groupId>javax.servlet</groupId>
  75. <artifactId>javax.servlet-api</artifactId>
  76. <scope>provided</scope>
  77. </dependency>
  78. <dependency>
  79. <groupId>org.eclipse.jetty</groupId>
  80. <artifactId>jetty-server</artifactId>
  81. <scope>test</scope>
  82. </dependency>
  83. <dependency>
  84. <groupId>org.apache.hadoop</groupId>
  85. <artifactId>hadoop-common</artifactId>
  86. <scope>compile</scope>
  87. <exclusions>
  88. <exclusion>
  89. <groupId>javax.xml.stream</groupId>
  90. <artifactId>stax-api</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>javax.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.eclipse.jetty</groupId>
  118. <artifactId>jetty-server</artifactId>
  119. </exclusion>
  120. <exclusion>
  121. <groupId>org.eclipse.jetty</groupId>
  122. <artifactId>jetty-util</artifactId>
  123. </exclusion>
  124. <exclusion>
  125. <groupId>org.eclipse.jetty</groupId>
  126. <artifactId>jsp-api-2.1</artifactId>
  127. </exclusion>
  128. <exclusion>
  129. <groupId>org.eclipse.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>org.eclipse.jdt</groupId>
  138. <artifactId>core</artifactId>
  139. </exclusion>
  140. <exclusion>
  141. <groupId>commons-el</groupId>
  142. <artifactId>commons-el</artifactId>
  143. </exclusion>
  144. </exclusions>
  145. </dependency>
  146. <dependency>
  147. <groupId>org.apache.hadoop</groupId>
  148. <artifactId>hadoop-common</artifactId>
  149. <scope>test</scope>
  150. <type>test-jar</type>
  151. </dependency>
  152. <dependency>
  153. <groupId>log4j</groupId>
  154. <artifactId>log4j</artifactId>
  155. <scope>compile</scope>
  156. </dependency>
  157. <dependency>
  158. <groupId>org.slf4j</groupId>
  159. <artifactId>slf4j-api</artifactId>
  160. <scope>compile</scope>
  161. </dependency>
  162. <dependency>
  163. <groupId>org.slf4j</groupId>
  164. <artifactId>slf4j-log4j12</artifactId>
  165. <scope>runtime</scope>
  166. </dependency>
  167. <dependency>
  168. <groupId>org.slf4j</groupId>
  169. <artifactId>jul-to-slf4j</artifactId>
  170. <scope>compile</scope>
  171. </dependency>
  172. <dependency>
  173. <groupId>org.eclipse.jetty</groupId>
  174. <artifactId>jetty-util</artifactId>
  175. <scope>compile</scope>
  176. </dependency>
  177. <dependency>
  178. <groupId>com.codahale.metrics</groupId>
  179. <artifactId>metrics-core</artifactId>
  180. <scope>compile</scope>
  181. </dependency>
  182. <dependency>
  183. <groupId>org.apache.curator</groupId>
  184. <artifactId>curator-test</artifactId>
  185. <scope>test</scope>
  186. </dependency>
  187. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  188. <dependency>
  189. <groupId>org.bouncycastle</groupId>
  190. <artifactId>bcprov-jdk16</artifactId>
  191. <scope>test</scope>
  192. </dependency>
  193. <dependency>
  194. <groupId>com.fasterxml.jackson.core</groupId>
  195. <artifactId>jackson-databind</artifactId>
  196. </dependency>
  197. </dependencies>
  198. <build>
  199. <plugins>
  200. <plugin>
  201. <groupId>org.apache.maven.plugins</groupId>
  202. <artifactId>maven-surefire-plugin</artifactId>
  203. <configuration>
  204. <forkMode>always</forkMode>
  205. <threadCount>1</threadCount>
  206. <forkedProcessTimeoutInSeconds>600</forkedProcessTimeoutInSeconds>
  207. <properties>
  208. <property>
  209. <name>listener</name>
  210. <value>org.apache.hadoop.test.TimedOutTestsListener</value>
  211. </property>
  212. </properties>
  213. <excludes>
  214. <exclude>**/${test.exclude}.java</exclude>
  215. <exclude>${test.exclude.pattern}</exclude>
  216. </excludes>
  217. </configuration>
  218. </plugin>
  219. <plugin>
  220. <groupId>org.apache.maven.plugins</groupId>
  221. <artifactId>maven-antrun-plugin</artifactId>
  222. <executions>
  223. <execution>
  224. <id>create-web-xmls</id>
  225. <phase>generate-test-resources</phase>
  226. <goals>
  227. <goal>run</goal>
  228. </goals>
  229. <configuration>
  230. <target>
  231. <mkdir dir="${project.build.directory}/test-classes/kms-webapp"/>
  232. <copy todir="${project.build.directory}/test-classes/kms-webapp">
  233. <fileset dir="${basedir}/src/main/webapp"/>
  234. </copy>
  235. </target>
  236. </configuration>
  237. </execution>
  238. </executions>
  239. </plugin>
  240. <plugin>
  241. <groupId>org.apache.maven.plugins</groupId>
  242. <artifactId>maven-war-plugin</artifactId>
  243. <executions>
  244. <execution>
  245. <id>default-war</id>
  246. <phase>prepare-package</phase>
  247. <goals>
  248. <goal>war</goal>
  249. </goals>
  250. <configuration>
  251. <archiveClasses>true</archiveClasses>
  252. <warName>kms</warName>
  253. <webappDirectory>${project.build.directory}/kms
  254. </webappDirectory>
  255. </configuration>
  256. </execution>
  257. </executions>
  258. </plugin>
  259. <plugin>
  260. <groupId>org.apache.maven.plugins</groupId>
  261. <artifactId>maven-jar-plugin</artifactId>
  262. <executions>
  263. <execution>
  264. <id>prepare-jar</id>
  265. <phase>prepare-package</phase>
  266. <goals>
  267. <goal>jar</goal>
  268. </goals>
  269. <configuration>
  270. <classifier>classes</classifier>
  271. </configuration>
  272. </execution>
  273. <execution>
  274. <id>prepare-test-jar</id>
  275. <phase>prepare-package</phase>
  276. <goals>
  277. <goal>test-jar</goal>
  278. </goals>
  279. </execution>
  280. </executions>
  281. </plugin>
  282. <plugin>
  283. <groupId>org.codehaus.mojo</groupId>
  284. <artifactId>findbugs-maven-plugin</artifactId>
  285. <configuration>
  286. <excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml
  287. </excludeFilterFile>
  288. </configuration>
  289. </plugin>
  290. </plugins>
  291. </build>
  292. <profiles>
  293. <profile>
  294. <id>docs</id>
  295. <activation>
  296. <activeByDefault>false</activeByDefault>
  297. </activation>
  298. <build>
  299. <plugins>
  300. <plugin>
  301. <groupId>org.apache.maven.plugins</groupId>
  302. <artifactId>maven-site-plugin</artifactId>
  303. <executions>
  304. <execution>
  305. <id>docs</id>
  306. <phase>prepare-package</phase>
  307. <goals>
  308. <goal>site</goal>
  309. </goals>
  310. </execution>
  311. </executions>
  312. </plugin>
  313. </plugins>
  314. </build>
  315. </profile>
  316. <profile>
  317. <id>dist</id>
  318. <activation>
  319. <activeByDefault>false</activeByDefault>
  320. </activation>
  321. <build>
  322. <plugins>
  323. <plugin>
  324. <groupId>org.apache.maven.plugins</groupId>
  325. <artifactId>maven-assembly-plugin</artifactId>
  326. <dependencies>
  327. <dependency>
  328. <groupId>org.apache.hadoop</groupId>
  329. <artifactId>hadoop-assemblies</artifactId>
  330. <version>${project.version}</version>
  331. </dependency>
  332. </dependencies>
  333. <executions>
  334. <execution>
  335. <id>dist</id>
  336. <phase>package</phase>
  337. <goals>
  338. <goal>single</goal>
  339. </goals>
  340. <configuration>
  341. <finalName>${project.artifactId}-${project.version}
  342. </finalName>
  343. <appendAssemblyId>false</appendAssemblyId>
  344. <attach>false</attach>
  345. <descriptorRefs>
  346. <descriptorRef>hadoop-kms-dist</descriptorRef>
  347. </descriptorRefs>
  348. </configuration>
  349. </execution>
  350. </executions>
  351. </plugin>
  352. <!-- Downloading Tomcat TAR.GZ, using downloads/ dir to avoid downloading over an over -->
  353. <plugin>
  354. <groupId>org.apache.maven.plugins</groupId>
  355. <artifactId>maven-antrun-plugin</artifactId>
  356. <executions>
  357. <execution>
  358. <id>dist</id>
  359. <goals>
  360. <goal>run</goal>
  361. </goals>
  362. <phase>package</phase>
  363. <configuration>
  364. <target>
  365. <mkdir dir="downloads"/>
  366. <get
  367. src="${tomcat.download.url}"
  368. dest="downloads/apache-tomcat-${tomcat.version}.tar.gz"
  369. verbose="true" skipexisting="true"/>
  370. <delete dir="${project.build.directory}/tomcat.exp"/>
  371. <mkdir dir="${project.build.directory}/tomcat.exp"/>
  372. <!-- Using Unix script to preserve file permissions -->
  373. <echo file="${project.build.directory}/tomcat-untar.sh">
  374. cd "${project.build.directory}/tomcat.exp"
  375. gzip -cd ../../downloads/apache-tomcat-${tomcat.version}.tar.gz | tar xf -
  376. </echo>
  377. <exec executable="${shell-executable}" dir="${project.build.directory}"
  378. failonerror="true">
  379. <arg line="./tomcat-untar.sh"/>
  380. </exec>
  381. <move
  382. file="${project.build.directory}/tomcat.exp/apache-tomcat-${tomcat.version}"
  383. tofile="${kms.tomcat.dist.dir}"/>
  384. <delete dir="${project.build.directory}/tomcat.exp"/>
  385. <delete dir="${kms.tomcat.dist.dir}/webapps"/>
  386. <mkdir dir="${kms.tomcat.dist.dir}/webapps"/>
  387. <delete file="${kms.tomcat.dist.dir}/conf/server.xml"/>
  388. <copy file="${basedir}/src/main/tomcat/server.xml"
  389. toDir="${kms.tomcat.dist.dir}/conf"/>
  390. <delete file="${kms.tomcat.dist.dir}/conf/ssl-server.xml.conf"/>
  391. <copy file="${basedir}/src/main/tomcat/ssl-server.xml.conf"
  392. toDir="${kms.tomcat.dist.dir}/conf"/>
  393. <delete
  394. file="${kms.tomcat.dist.dir}/conf/logging.properties"/>
  395. <copy file="${basedir}/src/main/tomcat/logging.properties"
  396. toDir="${kms.tomcat.dist.dir}/conf"/>
  397. <copy toDir="${kms.tomcat.dist.dir}/webapps/ROOT">
  398. <fileset dir="${basedir}/src/main/tomcat/ROOT"/>
  399. </copy>
  400. <copy toDir="${kms.tomcat.dist.dir}/webapps/kms">
  401. <fileset dir="${project.build.directory}/kms"/>
  402. </copy>
  403. </target>
  404. </configuration>
  405. </execution>
  406. <execution>
  407. <id>tar</id>
  408. <phase>package</phase>
  409. <goals>
  410. <goal>run</goal>
  411. </goals>
  412. <configuration>
  413. <target if="tar">
  414. <!-- Using Unix script to preserve symlinks -->
  415. <echo file="${project.build.directory}/dist-maketar.sh">
  416. cd "${project.build.directory}"
  417. tar cf - ${project.artifactId}-${project.version} | gzip > ${project.artifactId}-${project.version}.tar.gz
  418. </echo>
  419. <exec executable="${shell-executable}" dir="${project.build.directory}"
  420. failonerror="true">
  421. <arg line="./dist-maketar.sh"/>
  422. </exec>
  423. </target>
  424. </configuration>
  425. </execution>
  426. </executions>
  427. </plugin>
  428. </plugins>
  429. </build>
  430. </profile>
  431. </profiles>
  432. </project>