pom.xml 11 KB

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