pom.xml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418
  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. https://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.9-SNAPSHOT</version>
  21. </parent>
  22. <modelVersion>4.0.0</modelVersion>
  23. <artifactId>hadoop-yarn-server-nodemanager</artifactId>
  24. <version>3.3.9-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>org.apache.hadoop.thirdparty</groupId>
  87. <artifactId>hadoop-shaded-guava</artifactId>
  88. </dependency>
  89. <dependency>
  90. <groupId>org.slf4j</groupId>
  91. <artifactId>slf4j-api</artifactId>
  92. </dependency>
  93. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  94. <dependency>
  95. <groupId>org.apache.hadoop</groupId>
  96. <artifactId>hadoop-annotations</artifactId>
  97. </dependency>
  98. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  99. <dependency>
  100. <groupId>org.apache.hadoop</groupId>
  101. <artifactId>hadoop-common</artifactId>
  102. <type>test-jar</type>
  103. <scope>test</scope>
  104. </dependency>
  105. <dependency>
  106. <groupId>com.google.inject.extensions</groupId>
  107. <artifactId>guice-servlet</artifactId>
  108. </dependency>
  109. <dependency>
  110. <groupId>io.dropwizard.metrics</groupId>
  111. <artifactId>metrics-core</artifactId>
  112. </dependency>
  113. <dependency>
  114. <groupId>junit</groupId>
  115. <artifactId>junit</artifactId>
  116. <scope>test</scope>
  117. </dependency>
  118. <dependency>
  119. <groupId>org.mockito</groupId>
  120. <artifactId>mockito-core</artifactId>
  121. <scope>test</scope>
  122. </dependency>
  123. <dependency>
  124. <groupId>org.assertj</groupId>
  125. <artifactId>assertj-core</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.github.pjfanning</groupId>
  139. <artifactId>jersey-json</artifactId>
  140. <exclusions>
  141. <exclusion>
  142. <groupId>com.fasterxml.jackson.core</groupId>
  143. <artifactId>jackson-core</artifactId>
  144. </exclusion>
  145. <exclusion>
  146. <groupId>com.fasterxml.jackson.core</groupId>
  147. <artifactId>jackson-databind</artifactId>
  148. </exclusion>
  149. <exclusion>
  150. <groupId>com.fasterxml.jackson.jaxrs</groupId>
  151. <artifactId>jackson-jaxrs-json-provider</artifactId>
  152. </exclusion>
  153. <exclusion>
  154. <groupId>org.codehaus.jettison</groupId>
  155. <artifactId>jettison</artifactId>
  156. </exclusion>
  157. </exclusions>
  158. </dependency>
  159. <dependency>
  160. <groupId>com.sun.jersey.contribs</groupId>
  161. <artifactId>jersey-guice</artifactId>
  162. </dependency>
  163. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  164. <dependency>
  165. <groupId>org.apache.hadoop</groupId>
  166. <artifactId>hadoop-yarn-common</artifactId>
  167. <type>test-jar</type>
  168. <scope>test</scope>
  169. </dependency>
  170. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  171. <dependency>
  172. <groupId>org.apache.hadoop</groupId>
  173. <artifactId>hadoop-yarn-server-common</artifactId>
  174. </dependency>
  175. <dependency>
  176. <groupId>${leveldbjni.group}</groupId>
  177. <artifactId>leveldbjni-all</artifactId>
  178. </dependency>
  179. <dependency>
  180. <groupId>net.java.dev.jna</groupId>
  181. <artifactId>jna</artifactId>
  182. </dependency>
  183. <dependency>
  184. <groupId>org.apache.hadoop</groupId>
  185. <artifactId>hadoop-yarn-server-common</artifactId>
  186. <type>test-jar</type>
  187. <scope>test</scope>
  188. </dependency>
  189. </dependencies>
  190. <profiles>
  191. <profile>
  192. <id>native</id>
  193. <build>
  194. <plugins>
  195. <plugin>
  196. <groupId>org.apache.hadoop</groupId>
  197. <artifactId>hadoop-maven-plugins</artifactId>
  198. <executions>
  199. <execution>
  200. <id>cmake-compile</id>
  201. <phase>compile</phase>
  202. <goals><goal>cmake-compile</goal></goals>
  203. <configuration>
  204. <source>${basedir}/src</source>
  205. <vars>
  206. <HADOOP_CONF_DIR>${container-executor.conf.dir}</HADOOP_CONF_DIR>
  207. <JVM_ARCH_DATA_MODEL>${sun.arch.data.model}</JVM_ARCH_DATA_MODEL>
  208. </vars>
  209. <env>
  210. <CFLAGS>${container-executor.additional_cflags}</CFLAGS>
  211. </env>
  212. </configuration>
  213. </execution>
  214. <execution>
  215. <id>test-container-executor</id>
  216. <goals><goal>cmake-test</goal></goals>
  217. <phase>test</phase>
  218. <configuration>
  219. <binary>${project.build.directory}/native/target/usr/local/bin/test-container-executor</binary>
  220. <timeout>300</timeout>
  221. <results>${project.build.directory}/native-results</results>
  222. </configuration>
  223. </execution>
  224. <execution>
  225. <id>cetest</id>
  226. <goals><goal>cmake-test</goal></goals>
  227. <phase>test</phase>
  228. <configuration>
  229. <!-- this should match the xml name without the TEST-part down below -->
  230. <testName>cetest</testName>
  231. <workingDirectory>${project.build.directory}/native/test</workingDirectory>
  232. <source>${basedir}/src</source>
  233. <binary>${project.build.directory}/native/test/cetest</binary>
  234. <args>
  235. <arg>--gtest_filter=-Perf.</arg>
  236. <arg>--gtest_output=xml:${project.build.directory}/surefire-reports/TEST-cetest.xml</arg>
  237. </args>
  238. <results>${project.build.directory}/surefire-reports</results>
  239. </configuration>
  240. </execution>
  241. </executions>
  242. </plugin>
  243. <plugin>
  244. <groupId>org.apache.maven.plugins</groupId>
  245. <artifactId>maven-antrun-plugin</artifactId>
  246. <executions>
  247. <execution>
  248. <id>make</id>
  249. <phase>compile</phase>
  250. <goals>
  251. <goal>run</goal>
  252. </goals>
  253. <configuration>
  254. <target>
  255. <copy todir="${project.build.directory}/native/test/"
  256. overwrite="true">
  257. <fileset dir="${basedir}/src/main/native/container-executor/resources/test" />
  258. </copy>
  259. </target>
  260. </configuration>
  261. </execution>
  262. </executions>
  263. </plugin>
  264. </plugins>
  265. </build>
  266. <activation>
  267. <activeByDefault>false</activeByDefault>
  268. </activation>
  269. </profile>
  270. <profile>
  271. <id>visualize</id>
  272. <activation>
  273. <activeByDefault>false</activeByDefault>
  274. </activation>
  275. <build>
  276. <plugins>
  277. <plugin>
  278. <groupId>org.codehaus.mojo</groupId>
  279. <artifactId>exec-maven-plugin</artifactId>
  280. <executions>
  281. <execution>
  282. <phase>compile</phase>
  283. <goals>
  284. <goal>java</goal>
  285. </goals>
  286. <configuration>
  287. <mainClass>org.apache.hadoop.yarn.state.VisualizeStateMachine</mainClass>
  288. <classpathScope>compile</classpathScope>
  289. <arguments>
  290. <argument>NodeManager</argument>
  291. <argument>org.apache.hadoop.yarn.server.nodemanager.containermanager.application.ApplicationImpl,
  292. org.apache.hadoop.yarn.server.nodemanager.containermanager.container.ContainerImpl,
  293. org.apache.hadoop.yarn.server.nodemanager.containermanager.localizer.LocalizedResource</argument>
  294. <argument>NodeManager.gv</argument>
  295. </arguments>
  296. </configuration>
  297. </execution>
  298. </executions>
  299. </plugin>
  300. </plugins>
  301. </build>
  302. </profile>
  303. <profile>
  304. <id>native-win</id>
  305. <activation>
  306. <os>
  307. <family>Windows</family>
  308. </os>
  309. </activation>
  310. <build>
  311. <plugins>
  312. <plugin>
  313. <groupId>org.apache.maven.plugins</groupId>
  314. <artifactId>maven-surefire-plugin</artifactId>
  315. <configuration>
  316. <excludes>
  317. <exclude>org.apache.hadoop.yarn.server.nodemanager.containermanager.linux.**</exclude>
  318. </excludes>
  319. </configuration>
  320. </plugin>
  321. </plugins>
  322. </build>
  323. </profile>
  324. </profiles>
  325. <build>
  326. <plugins>
  327. <plugin>
  328. <artifactId>maven-surefire-plugin</artifactId>
  329. <configuration>
  330. <systemPropertyVariables>
  331. <property>
  332. <name>container-executor.path</name>
  333. <value>${container-executor.path}</value>
  334. </property>
  335. <property>
  336. <name>application.submitter</name>
  337. <value>${application.submitter}</value>
  338. </property>
  339. <property>
  340. <name>yarn.log.dir</name>
  341. <value>${maven.project.build.directory}/logs</value>
  342. </property>
  343. </systemPropertyVariables>
  344. <excludes>
  345. <exclude>**/TestFSDownload.java</exclude>
  346. </excludes>
  347. </configuration>
  348. </plugin>
  349. <plugin>
  350. <groupId>org.apache.rat</groupId>
  351. <artifactId>apache-rat-plugin</artifactId>
  352. <configuration>
  353. <excludes>
  354. <exclude>src/main/native/container-executor/impl/compat/fstatat.h</exclude>
  355. <exclude>src/main/native/container-executor/impl/compat/openat.h</exclude>
  356. <exclude>src/main/native/container-executor/impl/compat/unlinkat.h</exclude>
  357. <exclude>src/main/resources/TERMINAL/xterm/**/*</exclude>
  358. </excludes>
  359. </configuration>
  360. </plugin>
  361. <plugin>
  362. <groupId>org.xolstice.maven.plugins</groupId>
  363. <artifactId>protobuf-maven-plugin</artifactId>
  364. <executions>
  365. <execution>
  366. <id>src-compile-protoc</id>
  367. <configuration>
  368. <skip>false</skip>
  369. <additionalProtoPathElements>
  370. <additionalProtoPathElement>
  371. ${basedir}/../../../../hadoop-common-project/hadoop-common/src/main/proto
  372. </additionalProtoPathElement>
  373. <additionalProtoPathElement>
  374. ${basedir}/../../hadoop-yarn-api/src/main/proto
  375. </additionalProtoPathElement>
  376. </additionalProtoPathElements>
  377. </configuration>
  378. </execution>
  379. </executions>
  380. </plugin>
  381. <plugin>
  382. <groupId>com.google.code.maven-replacer-plugin</groupId>
  383. <artifactId>replacer</artifactId>
  384. <executions>
  385. <execution>
  386. <id>replace-generated-sources</id>
  387. <configuration>
  388. <skip>false</skip>
  389. </configuration>
  390. </execution>
  391. <execution>
  392. <id>replace-sources</id>
  393. <configuration>
  394. <skip>false</skip>
  395. </configuration>
  396. </execution>
  397. <execution>
  398. <id>replace-test-sources</id>
  399. <configuration>
  400. <skip>false</skip>
  401. </configuration>
  402. </execution>
  403. </executions>
  404. </plugin>
  405. </plugins>
  406. </build>
  407. </project>