pom.xml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385
  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>3.3.0-SNAPSHOT</version>
  21. </parent>
  22. <modelVersion>4.0.0</modelVersion>
  23. <artifactId>hadoop-yarn-server-nodemanager</artifactId>
  24. <version>3.3.0-SNAPSHOT</version>
  25. <name>Apache Hadoop YARN NodeManager</name>
  26. <properties>
  27. <!-- Basedir eeded for generating FindBugs warnings using parent pom -->
  28. <yarn.basedir>${project.parent.parent.basedir}</yarn.basedir>
  29. <container-executor.conf.dir>../etc/hadoop</container-executor.conf.dir>
  30. <container-executor.additional_cflags></container-executor.additional_cflags>
  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-common</artifactId>
  43. </dependency>
  44. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  45. <dependency>
  46. <groupId>org.apache.hadoop</groupId>
  47. <artifactId>hadoop-yarn-api</artifactId>
  48. </dependency>
  49. <dependency>
  50. <groupId>org.apache.hadoop</groupId>
  51. <artifactId>hadoop-registry</artifactId>
  52. </dependency>
  53. <dependency>
  54. <groupId>javax.xml.bind</groupId>
  55. <artifactId>jaxb-api</artifactId>
  56. </dependency>
  57. <dependency>
  58. <groupId>org.codehaus.jettison</groupId>
  59. <artifactId>jettison</artifactId>
  60. </dependency>
  61. <dependency>
  62. <groupId>javax.servlet</groupId>
  63. <artifactId>javax.servlet-api</artifactId>
  64. </dependency>
  65. <dependency>
  66. <groupId>commons-codec</groupId>
  67. <artifactId>commons-codec</artifactId>
  68. </dependency>
  69. <dependency>
  70. <groupId>com.sun.jersey</groupId>
  71. <artifactId>jersey-core</artifactId>
  72. </dependency>
  73. <dependency>
  74. <groupId>com.sun.jersey</groupId>
  75. <artifactId>jersey-client</artifactId>
  76. </dependency>
  77. <dependency>
  78. <groupId>org.eclipse.jetty</groupId>
  79. <artifactId>jetty-util</artifactId>
  80. </dependency>
  81. <dependency>
  82. <groupId>org.eclipse.jetty.websocket</groupId>
  83. <artifactId>javax-websocket-server-impl</artifactId>
  84. </dependency>
  85. <dependency>
  86. <groupId>com.google.guava</groupId>
  87. <artifactId>guava</artifactId>
  88. </dependency>
  89. <dependency>
  90. <groupId>commons-logging</groupId>
  91. <artifactId>commons-logging</artifactId>
  92. </dependency>
  93. <dependency>
  94. <groupId>org.slf4j</groupId>
  95. <artifactId>slf4j-api</artifactId>
  96. </dependency>
  97. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  98. <dependency>
  99. <groupId>org.apache.hadoop</groupId>
  100. <artifactId>hadoop-annotations</artifactId>
  101. </dependency>
  102. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  103. <dependency>
  104. <groupId>org.apache.hadoop</groupId>
  105. <artifactId>hadoop-common</artifactId>
  106. <type>test-jar</type>
  107. <scope>test</scope>
  108. </dependency>
  109. <dependency>
  110. <groupId>com.google.inject.extensions</groupId>
  111. <artifactId>guice-servlet</artifactId>
  112. </dependency>
  113. <dependency>
  114. <groupId>com.google.protobuf</groupId>
  115. <artifactId>protobuf-java</artifactId>
  116. </dependency>
  117. <dependency>
  118. <groupId>io.dropwizard.metrics</groupId>
  119. <artifactId>metrics-core</artifactId>
  120. </dependency>
  121. <dependency>
  122. <groupId>junit</groupId>
  123. <artifactId>junit</artifactId>
  124. <scope>test</scope>
  125. </dependency>
  126. <dependency>
  127. <groupId>org.mockito</groupId>
  128. <artifactId>mockito-core</artifactId>
  129. <scope>test</scope>
  130. </dependency>
  131. <dependency>
  132. <groupId>com.google.inject</groupId>
  133. <artifactId>guice</artifactId>
  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>com.sun.jersey</groupId>
  142. <artifactId>jersey-json</artifactId>
  143. </dependency>
  144. <dependency>
  145. <groupId>com.sun.jersey.contribs</groupId>
  146. <artifactId>jersey-guice</artifactId>
  147. </dependency>
  148. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  149. <dependency>
  150. <groupId>org.apache.hadoop</groupId>
  151. <artifactId>hadoop-yarn-common</artifactId>
  152. <type>test-jar</type>
  153. <scope>test</scope>
  154. </dependency>
  155. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  156. <dependency>
  157. <groupId>org.apache.hadoop</groupId>
  158. <artifactId>hadoop-yarn-server-common</artifactId>
  159. </dependency>
  160. <dependency>
  161. <groupId>org.fusesource.leveldbjni</groupId>
  162. <artifactId>leveldbjni-all</artifactId>
  163. </dependency>
  164. <dependency>
  165. <groupId>org.apache.hadoop</groupId>
  166. <artifactId>hadoop-yarn-server-common</artifactId>
  167. <type>test-jar</type>
  168. <scope>test</scope>
  169. </dependency>
  170. </dependencies>
  171. <profiles>
  172. <profile>
  173. <id>native</id>
  174. <build>
  175. <plugins>
  176. <plugin>
  177. <groupId>org.apache.hadoop</groupId>
  178. <artifactId>hadoop-maven-plugins</artifactId>
  179. <executions>
  180. <execution>
  181. <id>cmake-compile</id>
  182. <phase>compile</phase>
  183. <goals><goal>cmake-compile</goal></goals>
  184. <configuration>
  185. <source>${basedir}/src</source>
  186. <vars>
  187. <HADOOP_CONF_DIR>${container-executor.conf.dir}</HADOOP_CONF_DIR>
  188. <JVM_ARCH_DATA_MODEL>${sun.arch.data.model}</JVM_ARCH_DATA_MODEL>
  189. </vars>
  190. <env>
  191. <CFLAGS>${container-executor.additional_cflags}</CFLAGS>
  192. </env>
  193. </configuration>
  194. </execution>
  195. <execution>
  196. <id>test-container-executor</id>
  197. <goals><goal>cmake-test</goal></goals>
  198. <phase>test</phase>
  199. <configuration>
  200. <binary>${project.build.directory}/native/target/usr/local/bin/test-container-executor</binary>
  201. <timeout>300</timeout>
  202. <results>${project.build.directory}/native-results</results>
  203. </configuration>
  204. </execution>
  205. <execution>
  206. <id>cetest</id>
  207. <goals><goal>cmake-test</goal></goals>
  208. <phase>test</phase>
  209. <configuration>
  210. <!-- this should match the xml name without the TEST-part down below -->
  211. <testName>cetest</testName>
  212. <workingDirectory>${project.build.directory}/native/test</workingDirectory>
  213. <source>${basedir}/src</source>
  214. <binary>${project.build.directory}/native/test/cetest</binary>
  215. <args>
  216. <arg>--gtest_filter=-Perf.</arg>
  217. <arg>--gtest_output=xml:${project.build.directory}/surefire-reports/TEST-cetest.xml</arg>
  218. </args>
  219. <results>${project.build.directory}/surefire-reports</results>
  220. </configuration>
  221. </execution>
  222. </executions>
  223. </plugin>
  224. <plugin>
  225. <groupId>org.apache.maven.plugins</groupId>
  226. <artifactId>maven-antrun-plugin</artifactId>
  227. <executions>
  228. <execution>
  229. <id>make</id>
  230. <phase>compile</phase>
  231. <goals>
  232. <goal>run</goal>
  233. </goals>
  234. <configuration>
  235. <target>
  236. <copy todir="${project.build.directory}/native/test/"
  237. overwrite="true">
  238. <fileset dir="${basedir}/src/main/native/container-executor/resources/test" />
  239. </copy>
  240. </target>
  241. </configuration>
  242. </execution>
  243. </executions>
  244. </plugin>
  245. </plugins>
  246. </build>
  247. <activation>
  248. <activeByDefault>false</activeByDefault>
  249. </activation>
  250. </profile>
  251. <profile>
  252. <id>visualize</id>
  253. <activation>
  254. <activeByDefault>false</activeByDefault>
  255. </activation>
  256. <build>
  257. <plugins>
  258. <plugin>
  259. <groupId>org.codehaus.mojo</groupId>
  260. <artifactId>exec-maven-plugin</artifactId>
  261. <executions>
  262. <execution>
  263. <phase>compile</phase>
  264. <goals>
  265. <goal>java</goal>
  266. </goals>
  267. <configuration>
  268. <mainClass>org.apache.hadoop.yarn.state.VisualizeStateMachine</mainClass>
  269. <classpathScope>compile</classpathScope>
  270. <arguments>
  271. <argument>NodeManager</argument>
  272. <argument>org.apache.hadoop.yarn.server.nodemanager.containermanager.application.ApplicationImpl,
  273. org.apache.hadoop.yarn.server.nodemanager.containermanager.container.ContainerImpl,
  274. org.apache.hadoop.yarn.server.nodemanager.containermanager.localizer.LocalizedResource</argument>
  275. <argument>NodeManager.gv</argument>
  276. </arguments>
  277. </configuration>
  278. </execution>
  279. </executions>
  280. </plugin>
  281. </plugins>
  282. </build>
  283. </profile>
  284. <profile>
  285. <id>native-win</id>
  286. <activation>
  287. <os>
  288. <family>Windows</family>
  289. </os>
  290. </activation>
  291. <build>
  292. <plugins>
  293. <plugin>
  294. <groupId>org.apache.maven.plugins</groupId>
  295. <artifactId>maven-surefire-plugin</artifactId>
  296. <configuration>
  297. <excludes>
  298. <exclude>org.apache.hadoop.yarn.server.nodemanager.containermanager.linux.**</exclude>
  299. </excludes>
  300. </configuration>
  301. </plugin>
  302. </plugins>
  303. </build>
  304. </profile>
  305. </profiles>
  306. <build>
  307. <plugins>
  308. <plugin>
  309. <artifactId>maven-surefire-plugin</artifactId>
  310. <configuration>
  311. <systemPropertyVariables>
  312. <property>
  313. <name>container-executor.path</name>
  314. <value>${container-executor.path}</value>
  315. </property>
  316. <property>
  317. <name>application.submitter</name>
  318. <value>${application.submitter}</value>
  319. </property>
  320. <property>
  321. <name>yarn.log.dir</name>
  322. <value>${maven.project.build.directory}/logs</value>
  323. </property>
  324. </systemPropertyVariables>
  325. <excludes>
  326. <exclude>**/TestFSDownload.java</exclude>
  327. </excludes>
  328. </configuration>
  329. </plugin>
  330. <plugin>
  331. <groupId>org.apache.rat</groupId>
  332. <artifactId>apache-rat-plugin</artifactId>
  333. <configuration>
  334. <excludes>
  335. <exclude>src/main/native/container-executor/impl/compat/fstatat.h</exclude>
  336. <exclude>src/main/native/container-executor/impl/compat/openat.h</exclude>
  337. <exclude>src/main/native/container-executor/impl/compat/unlinkat.h</exclude>
  338. <exclude>src/main/resources/TERMINAL/xterm/**/*</exclude>
  339. </excludes>
  340. </configuration>
  341. </plugin>
  342. <plugin>
  343. <groupId>org.apache.hadoop</groupId>
  344. <artifactId>hadoop-maven-plugins</artifactId>
  345. <executions>
  346. <execution>
  347. <id>compile-protoc</id>
  348. <goals>
  349. <goal>protoc</goal>
  350. </goals>
  351. <configuration>
  352. <protocVersion>${protobuf.version}</protocVersion>
  353. <protocCommand>${protoc.path}</protocCommand>
  354. <imports>
  355. <param>${basedir}/../../../../hadoop-common-project/hadoop-common/src/main/proto</param>
  356. <param>${basedir}/../../hadoop-yarn-api/src/main/proto</param>
  357. <param>${basedir}/src/main/proto</param>
  358. </imports>
  359. <source>
  360. <directory>${basedir}/src/main/proto</directory>
  361. <includes>
  362. <include>yarn_server_nodemanager_recovery.proto</include>
  363. <include>yarn_server_nodemanager_service_protos.proto</include>
  364. <include>LocalizationProtocol.proto</include>
  365. </includes>
  366. </source>
  367. </configuration>
  368. </execution>
  369. </executions>
  370. </plugin>
  371. </plugins>
  372. </build>
  373. </project>