pom.xml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329
  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-server</artifactId>
  19. <groupId>org.apache.hadoop</groupId>
  20. <version>2.5.1</version>
  21. </parent>
  22. <modelVersion>4.0.0</modelVersion>
  23. <groupId>org.apache.hadoop</groupId>
  24. <artifactId>hadoop-yarn-server-nodemanager</artifactId>
  25. <version>2.5.1</version>
  26. <name>hadoop-yarn-server-nodemanager</name>
  27. <properties>
  28. <!-- Basedir eeded for generating FindBugs warnings using parent pom -->
  29. <yarn.basedir>${project.parent.parent.basedir}</yarn.basedir>
  30. <container-executor.conf.dir>../etc/hadoop</container-executor.conf.dir>
  31. <container-executor.additional_cflags></container-executor.additional_cflags>
  32. </properties>
  33. <dependencies>
  34. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  35. <dependency>
  36. <groupId>org.apache.hadoop</groupId>
  37. <artifactId>hadoop-common</artifactId>
  38. <scope>provided</scope>
  39. <exclusions>
  40. <exclusion>
  41. <groupId>commons-el</groupId>
  42. <artifactId>commons-el</artifactId>
  43. </exclusion>
  44. <exclusion>
  45. <groupId>tomcat</groupId>
  46. <artifactId>jasper-runtime</artifactId>
  47. </exclusion>
  48. <exclusion>
  49. <groupId>tomcat</groupId>
  50. <artifactId>jasper-compiler</artifactId>
  51. </exclusion>
  52. <exclusion>
  53. <groupId>org.mortbay.jetty</groupId>
  54. <artifactId>jsp-2.1-jetty</artifactId>
  55. </exclusion>
  56. </exclusions>
  57. </dependency>
  58. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  59. <dependency>
  60. <groupId>org.apache.hadoop</groupId>
  61. <artifactId>hadoop-yarn-common</artifactId>
  62. </dependency>
  63. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  64. <dependency>
  65. <groupId>org.apache.hadoop</groupId>
  66. <artifactId>hadoop-yarn-api</artifactId>
  67. </dependency>
  68. <dependency>
  69. <groupId>javax.xml.bind</groupId>
  70. <artifactId>jaxb-api</artifactId>
  71. </dependency>
  72. <dependency>
  73. <groupId>org.codehaus.jettison</groupId>
  74. <artifactId>jettison</artifactId>
  75. </dependency>
  76. <dependency>
  77. <groupId>commons-lang</groupId>
  78. <artifactId>commons-lang</artifactId>
  79. </dependency>
  80. <dependency>
  81. <groupId>javax.servlet</groupId>
  82. <artifactId>servlet-api</artifactId>
  83. </dependency>
  84. <dependency>
  85. <groupId>commons-codec</groupId>
  86. <artifactId>commons-codec</artifactId>
  87. </dependency>
  88. <dependency>
  89. <groupId>com.sun.jersey</groupId>
  90. <artifactId>jersey-core</artifactId>
  91. </dependency>
  92. <dependency>
  93. <groupId>com.sun.jersey</groupId>
  94. <artifactId>jersey-client</artifactId>
  95. </dependency>
  96. <dependency>
  97. <groupId>org.mortbay.jetty</groupId>
  98. <artifactId>jetty-util</artifactId>
  99. </dependency>
  100. <dependency>
  101. <groupId>com.google.guava</groupId>
  102. <artifactId>guava</artifactId>
  103. </dependency>
  104. <dependency>
  105. <groupId>commons-logging</groupId>
  106. <artifactId>commons-logging</artifactId>
  107. </dependency>
  108. <dependency>
  109. <groupId>org.slf4j</groupId>
  110. <artifactId>slf4j-api</artifactId>
  111. </dependency>
  112. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  113. <dependency>
  114. <groupId>org.apache.hadoop</groupId>
  115. <artifactId>hadoop-annotations</artifactId>
  116. </dependency>
  117. <dependency>
  118. <groupId>org.mockito</groupId>
  119. <artifactId>mockito-all</artifactId>
  120. <scope>test</scope>
  121. </dependency>
  122. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  123. <dependency>
  124. <groupId>org.apache.hadoop</groupId>
  125. <artifactId>hadoop-common</artifactId>
  126. <type>test-jar</type>
  127. <scope>test</scope>
  128. </dependency>
  129. <dependency>
  130. <groupId>com.google.inject.extensions</groupId>
  131. <artifactId>guice-servlet</artifactId>
  132. </dependency>
  133. <dependency>
  134. <groupId>com.google.protobuf</groupId>
  135. <artifactId>protobuf-java</artifactId>
  136. </dependency>
  137. <dependency>
  138. <groupId>junit</groupId>
  139. <artifactId>junit</artifactId>
  140. <scope>test</scope>
  141. </dependency>
  142. <dependency>
  143. <groupId>com.google.inject</groupId>
  144. <artifactId>guice</artifactId>
  145. </dependency>
  146. <dependency>
  147. <groupId>com.sun.jersey.jersey-test-framework</groupId>
  148. <artifactId>jersey-test-framework-grizzly2</artifactId>
  149. <scope>test</scope>
  150. </dependency>
  151. <dependency>
  152. <groupId>com.sun.jersey</groupId>
  153. <artifactId>jersey-json</artifactId>
  154. </dependency>
  155. <dependency>
  156. <groupId>com.sun.jersey.contribs</groupId>
  157. <artifactId>jersey-guice</artifactId>
  158. </dependency>
  159. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  160. <dependency>
  161. <groupId>org.apache.hadoop</groupId>
  162. <artifactId>hadoop-yarn-common</artifactId>
  163. <type>test-jar</type>
  164. <scope>test</scope>
  165. </dependency>
  166. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  167. <dependency>
  168. <groupId>org.apache.hadoop</groupId>
  169. <artifactId>hadoop-yarn-server-common</artifactId>
  170. </dependency>
  171. <dependency>
  172. <groupId>org.fusesource.leveldbjni</groupId>
  173. <artifactId>leveldbjni-all</artifactId>
  174. </dependency>
  175. </dependencies>
  176. <profiles>
  177. <profile>
  178. <id>native</id>
  179. <build>
  180. <plugins>
  181. <plugin>
  182. <groupId>org.apache.maven.plugins</groupId>
  183. <artifactId>maven-antrun-plugin</artifactId>
  184. <configuration>
  185. <skipTests>false</skipTests>
  186. </configuration>
  187. <executions>
  188. <execution>
  189. <id>make</id>
  190. <phase>compile</phase>
  191. <goals><goal>run</goal></goals>
  192. <configuration>
  193. <target>
  194. <mkdir dir="${project.build.directory}/native/target"/>
  195. <exec executable="cmake" dir="${project.build.directory}/native" failonerror="true">
  196. <arg line="${basedir}/src/ -DHADOOP_CONF_DIR=${container-executor.conf.dir} -DJVM_ARCH_DATA_MODEL=${sun.arch.data.model}"/>
  197. <env key="CFLAGS" value="${container-executor.additional_cflags}"/>
  198. </exec>
  199. <exec executable="make" dir="${project.build.directory}/native" failonerror="true">
  200. <arg line="VERBOSE=1"/>
  201. </exec>
  202. <!-- The second make is a workaround for HADOOP-9215. It can
  203. be removed when version 2.6 of cmake is no longer supported . -->
  204. <exec executable="make" dir="${project.build.directory}/native" failonerror="true"></exec>
  205. </target>
  206. </configuration>
  207. </execution>
  208. <execution>
  209. <id>native_tests</id>
  210. <phase>test</phase>
  211. <configuration>
  212. <target>
  213. <exec executable="sh" failonerror="true" dir="${project.build.directory}/native">
  214. <arg value="-c"/>
  215. <arg value="[ x$SKIPTESTS = xtrue ] || test-container-executor"/>
  216. <env key="SKIPTESTS" value="${skipTests}"/>
  217. </exec>
  218. </target>
  219. </configuration>
  220. </execution>
  221. </executions>
  222. </plugin>
  223. </plugins>
  224. </build>
  225. <activation>
  226. <activeByDefault>false</activeByDefault>
  227. </activation>
  228. </profile>
  229. <profile>
  230. <id>visualize</id>
  231. <activation>
  232. <activeByDefault>false</activeByDefault>
  233. </activation>
  234. <build>
  235. <plugins>
  236. <plugin>
  237. <groupId>org.codehaus.mojo</groupId>
  238. <artifactId>exec-maven-plugin</artifactId>
  239. <executions>
  240. <execution>
  241. <phase>compile</phase>
  242. <goals>
  243. <goal>java</goal>
  244. </goals>
  245. <configuration>
  246. <mainClass>org.apache.hadoop.yarn.state.VisualizeStateMachine</mainClass>
  247. <classpathScope>compile</classpathScope>
  248. <arguments>
  249. <argument>NodeManager</argument>
  250. <argument>org.apache.hadoop.yarn.server.nodemanager.containermanager.application.ApplicationImpl,
  251. org.apache.hadoop.yarn.server.nodemanager.containermanager.container.ContainerImpl,
  252. org.apache.hadoop.yarn.server.nodemanager.containermanager.localizer.LocalizedResource</argument>
  253. <argument>NodeManager.gv</argument>
  254. </arguments>
  255. </configuration>
  256. </execution>
  257. </executions>
  258. </plugin>
  259. </plugins>
  260. </build>
  261. </profile>
  262. </profiles>
  263. <build>
  264. <plugins>
  265. <plugin>
  266. <artifactId>maven-surefire-plugin</artifactId>
  267. <configuration>
  268. <systemPropertyVariables>
  269. <property>
  270. <name>container-executor.path</name>
  271. <value>${container-executor.path}</value>
  272. </property>
  273. <property>
  274. <name>application.submitter</name>
  275. <value>${application.submitter}</value>
  276. </property>
  277. <property>
  278. <name>yarn.log.dir</name>
  279. <value>${maven.project.build.directory}/logs</value>
  280. </property>
  281. </systemPropertyVariables>
  282. <excludes>
  283. <exclude>**/TestFSDownload.java</exclude>
  284. </excludes>
  285. </configuration>
  286. </plugin>
  287. <plugin>
  288. <groupId>org.apache.hadoop</groupId>
  289. <artifactId>hadoop-maven-plugins</artifactId>
  290. <executions>
  291. <execution>
  292. <id>compile-protoc</id>
  293. <phase>generate-sources</phase>
  294. <goals>
  295. <goal>protoc</goal>
  296. </goals>
  297. <configuration>
  298. <protocVersion>${protobuf.version}</protocVersion>
  299. <protocCommand>${protoc.path}</protocCommand>
  300. <imports>
  301. <param>${basedir}/../../../../hadoop-common-project/hadoop-common/src/main/proto</param>
  302. <param>${basedir}/../../hadoop-yarn-api/src/main/proto</param>
  303. <param>${basedir}/src/main/proto</param>
  304. </imports>
  305. <source>
  306. <directory>${basedir}/src/main/proto</directory>
  307. <includes>
  308. <include>yarn_server_nodemanager_recovery.proto</include>
  309. <include>yarn_server_nodemanager_service_protos.proto</include>
  310. <include>LocalizationProtocol.proto</include>
  311. </includes>
  312. </source>
  313. <output>${project.build.directory}/generated-sources/java</output>
  314. </configuration>
  315. </execution>
  316. </executions>
  317. </plugin>
  318. </plugins>
  319. </build>
  320. </project>