pom.xml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370
  1. <?xml version="1.0"?>
  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. See accompanying LICENSE file.
  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. <parent>
  18. <artifactId>hadoop-yarn</artifactId>
  19. <groupId>org.apache.hadoop</groupId>
  20. <version>3.0.0-beta1-SNAPSHOT</version>
  21. </parent>
  22. <modelVersion>4.0.0</modelVersion>
  23. <artifactId>hadoop-yarn-common</artifactId>
  24. <version>3.0.0-beta1-SNAPSHOT</version>
  25. <name>Apache Hadoop YARN Common</name>
  26. <properties>
  27. <!-- Needed for generating FindBugs warnings using parent pom -->
  28. <yarn.basedir>${project.parent.basedir}</yarn.basedir>
  29. <should.run.jdiff>true</should.run.jdiff>
  30. <dev-support.relative.dir>../dev-support</dev-support.relative.dir>
  31. </properties>
  32. <dependencies>
  33. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  34. <dependency>
  35. <groupId>org.apache.hadoop</groupId>
  36. <artifactId>hadoop-common</artifactId>
  37. <scope>provided</scope>
  38. </dependency>
  39. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  40. <dependency>
  41. <groupId>org.apache.hadoop</groupId>
  42. <artifactId>hadoop-yarn-api</artifactId>
  43. </dependency>
  44. <dependency>
  45. <groupId>org.apache.hadoop</groupId>
  46. <artifactId>hadoop-auth</artifactId>
  47. </dependency>
  48. <dependency>
  49. <groupId>javax.xml.bind</groupId>
  50. <artifactId>jaxb-api</artifactId>
  51. </dependency>
  52. <dependency>
  53. <groupId>org.apache.commons</groupId>
  54. <artifactId>commons-compress</artifactId>
  55. </dependency>
  56. <dependency>
  57. <groupId>commons-lang</groupId>
  58. <artifactId>commons-lang</artifactId>
  59. </dependency>
  60. <dependency>
  61. <groupId>javax.servlet</groupId>
  62. <artifactId>javax.servlet-api</artifactId>
  63. </dependency>
  64. <dependency>
  65. <groupId>commons-codec</groupId>
  66. <artifactId>commons-codec</artifactId>
  67. </dependency>
  68. <dependency>
  69. <groupId>org.eclipse.jetty</groupId>
  70. <artifactId>jetty-util</artifactId>
  71. </dependency>
  72. <dependency>
  73. <groupId>com.sun.jersey</groupId>
  74. <artifactId>jersey-core</artifactId>
  75. </dependency>
  76. <dependency>
  77. <groupId>com.sun.jersey</groupId>
  78. <artifactId>jersey-client</artifactId>
  79. </dependency>
  80. <dependency>
  81. <groupId>com.google.guava</groupId>
  82. <artifactId>guava</artifactId>
  83. </dependency>
  84. <dependency>
  85. <groupId>commons-logging</groupId>
  86. <artifactId>commons-logging</artifactId>
  87. </dependency>
  88. <dependency>
  89. <groupId>commons-cli</groupId>
  90. <artifactId>commons-cli</artifactId>
  91. </dependency>
  92. <dependency>
  93. <groupId>org.slf4j</groupId>
  94. <artifactId>slf4j-api</artifactId>
  95. </dependency>
  96. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  97. <dependency>
  98. <groupId>org.apache.hadoop</groupId>
  99. <artifactId>hadoop-annotations</artifactId>
  100. </dependency>
  101. <!--
  102. junit must be before mockito-all on the classpath. mockito-all bundles its
  103. own copy of the hamcrest classes, but they don't match our junit version.
  104. -->
  105. <dependency>
  106. <groupId>junit</groupId>
  107. <artifactId>junit</artifactId>
  108. <scope>test</scope>
  109. </dependency>
  110. <dependency>
  111. <groupId>org.mockito</groupId>
  112. <artifactId>mockito-all</artifactId>
  113. <scope>test</scope>
  114. </dependency>
  115. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  116. <dependency>
  117. <groupId>org.apache.hadoop</groupId>
  118. <artifactId>hadoop-common</artifactId>
  119. <type>test-jar</type>
  120. <scope>test</scope>
  121. </dependency>
  122. <dependency>
  123. <groupId>com.google.inject.extensions</groupId>
  124. <artifactId>guice-servlet</artifactId>
  125. </dependency>
  126. <dependency>
  127. <groupId>com.google.protobuf</groupId>
  128. <artifactId>protobuf-java</artifactId>
  129. </dependency>
  130. <dependency>
  131. <groupId>org.bouncycastle</groupId>
  132. <artifactId>bcprov-jdk16</artifactId>
  133. <scope>test</scope>
  134. </dependency>
  135. <dependency>
  136. <groupId>com.sun.jersey.jersey-test-framework</groupId>
  137. <artifactId>jersey-test-framework-grizzly2</artifactId>
  138. <scope>test</scope>
  139. </dependency>
  140. <dependency>
  141. <groupId>commons-io</groupId>
  142. <artifactId>commons-io</artifactId>
  143. </dependency>
  144. <dependency>
  145. <groupId>com.google.inject</groupId>
  146. <artifactId>guice</artifactId>
  147. </dependency>
  148. <dependency>
  149. <groupId>com.sun.jersey</groupId>
  150. <artifactId>jersey-server</artifactId>
  151. </dependency>
  152. <dependency>
  153. <groupId>com.sun.jersey</groupId>
  154. <artifactId>jersey-json</artifactId>
  155. </dependency>
  156. <dependency>
  157. <groupId>com.sun.jersey.contribs</groupId>
  158. <artifactId>jersey-guice</artifactId>
  159. </dependency>
  160. <dependency>
  161. <groupId>log4j</groupId>
  162. <artifactId>log4j</artifactId>
  163. </dependency>
  164. <dependency>
  165. <groupId>com.fasterxml.jackson.core</groupId>
  166. <artifactId>jackson-core</artifactId>
  167. </dependency>
  168. <dependency>
  169. <groupId>com.fasterxml.jackson.core</groupId>
  170. <artifactId>jackson-databind</artifactId>
  171. </dependency>
  172. <dependency>
  173. <groupId>com.fasterxml.jackson.module</groupId>
  174. <artifactId>jackson-module-jaxb-annotations</artifactId>
  175. </dependency>
  176. <dependency>
  177. <groupId>com.fasterxml.jackson.jaxrs</groupId>
  178. <artifactId>jackson-jaxrs-json-provider</artifactId>
  179. </dependency>
  180. </dependencies>
  181. <build>
  182. <!--
  183. Include all files in src/main/resources. By default, do not apply property
  184. substitution (filtering=false), but do apply property substitution to
  185. yarn-version-info.properties (filtering=true). This will substitute the
  186. version information correctly, but prevent Maven from altering other files
  187. like yarn-default.xml.
  188. -->
  189. <resources>
  190. <resource>
  191. <directory>${basedir}/src/main/resources</directory>
  192. <excludes>
  193. <exclude>yarn-version-info.properties</exclude>
  194. </excludes>
  195. <filtering>false</filtering>
  196. </resource>
  197. <resource>
  198. <directory>${basedir}/src/main/resources</directory>
  199. <includes>
  200. <include>yarn-version-info.properties</include>
  201. </includes>
  202. <filtering>true</filtering>
  203. </resource>
  204. </resources>
  205. <plugins>
  206. <plugin>
  207. <groupId>org.apache.rat</groupId>
  208. <artifactId>apache-rat-plugin</artifactId>
  209. <configuration>
  210. <excludes>
  211. <exclude>src/main/resources/webapps/mapreduce/.keep</exclude>
  212. <exclude>src/main/resources/webapps/jobhistory/.keep</exclude>
  213. <exclude>src/main/resources/webapps/yarn/.keep</exclude>
  214. <exclude>src/main/resources/webapps/applicationhistory/.keep</exclude>
  215. <exclude>src/main/resources/webapps/timeline/.keep</exclude>
  216. <exclude>src/main/resources/webapps/sharedcache/.keep</exclude>
  217. <exclude>src/main/resources/webapps/cluster/.keep</exclude>
  218. <exclude>src/main/resources/webapps/test/.keep</exclude>
  219. <exclude>src/main/resources/webapps/proxy/.keep</exclude>
  220. <exclude>src/main/resources/webapps/node/.keep</exclude>
  221. <exclude>src/main/resources/webapps/static/dt-1.9.4/css/jui-dt.css</exclude>
  222. <exclude>src/main/resources/webapps/static/dt-1.9.4/css/demo_table.css</exclude>
  223. <exclude>src/main/resources/webapps/static/dt-1.9.4/images/Sorting icons.psd</exclude>
  224. <exclude>src/main/resources/webapps/static/dt-1.9.4/js/jquery.dataTables.min.js</exclude>
  225. <exclude>src/main/resources/webapps/static/jt/jquery.jstree.js</exclude>
  226. <exclude>src/main/resources/webapps/static/jquery/jquery-ui-1.9.1.custom.min.js</exclude>
  227. <exclude>src/main/resources/webapps/static/jquery/jquery-1.8.2.min.js</exclude>
  228. <exclude>src/main/resources/webapps/static/jquery/themes-1.9.1/base/jquery-ui.css</exclude>
  229. <exclude>src/test/resources/application_1440536969523_0001.har/_index</exclude>
  230. <exclude>src/test/resources/application_1440536969523_0001.har/part-0</exclude>
  231. <exclude>src/test/resources/application_1440536969523_0001.har/_masterindex</exclude>
  232. <exclude>src/test/resources/application_1440536969523_0001.har/_SUCCESS</exclude>
  233. </excludes>
  234. </configuration>
  235. </plugin>
  236. <plugin>
  237. <groupId>org.apache.hadoop</groupId>
  238. <artifactId>hadoop-maven-plugins</artifactId>
  239. <executions>
  240. <execution>
  241. <id>version-info</id>
  242. <phase>generate-resources</phase>
  243. <goals>
  244. <goal>version-info</goal>
  245. </goals>
  246. <configuration>
  247. <source>
  248. <directory>${basedir}/src/main</directory>
  249. <includes>
  250. <include>java/**/*.java</include>
  251. <include>proto/**/*.proto</include>
  252. </includes>
  253. </source>
  254. </configuration>
  255. </execution>
  256. <execution>
  257. <id>compile-protoc</id>
  258. <goals>
  259. <goal>protoc</goal>
  260. </goals>
  261. <configuration>
  262. <protocVersion>${protobuf.version}</protocVersion>
  263. <protocCommand>${protoc.path}</protocCommand>
  264. <imports>
  265. <param>${basedir}/../../../hadoop-common-project/hadoop-common/src/main/proto</param>
  266. <param>${basedir}/../hadoop-yarn-api/src/main/proto</param>
  267. <param>${basedir}/src/main/proto</param>
  268. </imports>
  269. <source>
  270. <directory>${basedir}/src/main/proto</directory>
  271. <includes>
  272. <include>yarn_security_token.proto</include>
  273. </includes>
  274. </source>
  275. </configuration>
  276. </execution>
  277. <execution>
  278. <id>resource-gz</id>
  279. <phase>generate-resources</phase>
  280. <goals>
  281. <goal>resource-gz</goal>
  282. </goals>
  283. <configuration>
  284. <inputDirectory>${basedir}/src/main/resources/webapps/static</inputDirectory>
  285. <outputDirectory>${basedir}/target/classes/webapps/static</outputDirectory>
  286. <extensions>js,css</extensions>
  287. </configuration>
  288. </execution>
  289. </executions>
  290. </plugin>
  291. <plugin>
  292. <artifactId>maven-jar-plugin</artifactId>
  293. <executions>
  294. <execution>
  295. <goals>
  296. <goal>test-jar</goal>
  297. </goals>
  298. <phase>test-compile</phase>
  299. </execution>
  300. </executions>
  301. </plugin>
  302. <plugin>
  303. <artifactId>maven-antrun-plugin</artifactId>
  304. <executions>
  305. <execution>
  306. <phase>pre-site</phase>
  307. <goals>
  308. <goal>run</goal>
  309. </goals>
  310. <configuration>
  311. <tasks>
  312. <copy file="src/main/resources/yarn-default.xml" todir="src/site/resources"/>
  313. <copy file="src/main/xsl/configuration.xsl" todir="src/site/resources"/>
  314. </tasks>
  315. </configuration>
  316. </execution>
  317. </executions>
  318. </plugin>
  319. <plugin>
  320. <artifactId>maven-clean-plugin</artifactId>
  321. <configuration>
  322. <filesets>
  323. <fileset>
  324. <directory>src/site/resources</directory>
  325. <includes>
  326. <include>configuration.xsl</include>
  327. <include>yarn-default.xml</include>
  328. </includes>
  329. <followSymlinks>false</followSymlinks>
  330. </fileset>
  331. </filesets>
  332. </configuration>
  333. </plugin>
  334. </plugins>
  335. </build>
  336. <!-- TODO: Remove this profile when hamlet was removed. -->
  337. <profiles>
  338. <profile>
  339. <id>java9</id>
  340. <activation>
  341. <jdk>9</jdk>
  342. </activation>
  343. <build>
  344. <plugins>
  345. <plugin>
  346. <artifactId>maven-compiler-plugin</artifactId>
  347. <configuration>
  348. <excludes>
  349. <exclude>src/main/java/org/apache/hadoop/yarn/webapp/hamlet/**</exclude>
  350. <exclude>src/main/test/org/apache/haodop/yarn/webapp/hamlet/**</exclude>
  351. </excludes>
  352. </configuration>
  353. </plugin>
  354. </plugins>
  355. </build>
  356. </profile>
  357. </profiles>
  358. </project>