pom.xml 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459
  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.5.0-SNAPSHOT</version>
  21. </parent>
  22. <modelVersion>4.0.0</modelVersion>
  23. <artifactId>hadoop-yarn-server-nodemanager</artifactId>
  24. <version>3.5.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. <exclusions>
  39. <exclusion>
  40. <artifactId>javax.servlet-api</artifactId>
  41. <groupId>javax.servlet</groupId>
  42. </exclusion>
  43. </exclusions>
  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-common</artifactId>
  49. </dependency>
  50. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  51. <dependency>
  52. <groupId>org.apache.hadoop</groupId>
  53. <artifactId>hadoop-yarn-api</artifactId>
  54. </dependency>
  55. <dependency>
  56. <groupId>org.apache.hadoop</groupId>
  57. <artifactId>hadoop-registry</artifactId>
  58. </dependency>
  59. <dependency>
  60. <groupId>jakarta.xml.bind</groupId>
  61. <artifactId>jakarta.xml.bind-api</artifactId>
  62. </dependency>
  63. <dependency>
  64. <groupId>org.codehaus.jettison</groupId>
  65. <artifactId>jettison</artifactId>
  66. </dependency>
  67. <dependency>
  68. <groupId>jakarta.servlet</groupId>
  69. <artifactId>jakarta.servlet-api</artifactId>
  70. </dependency>
  71. <dependency>
  72. <groupId>commons-codec</groupId>
  73. <artifactId>commons-codec</artifactId>
  74. </dependency>
  75. <dependency>
  76. <groupId>org.eclipse.jetty</groupId>
  77. <artifactId>jetty-util</artifactId>
  78. </dependency>
  79. <dependency>
  80. <groupId>org.eclipse.jetty.websocket</groupId>
  81. <artifactId>javax-websocket-server-impl</artifactId>
  82. </dependency>
  83. <dependency>
  84. <groupId>org.apache.hadoop.thirdparty</groupId>
  85. <artifactId>hadoop-shaded-guava</artifactId>
  86. </dependency>
  87. <dependency>
  88. <groupId>org.junit.jupiter</groupId>
  89. <artifactId>junit-jupiter-api</artifactId>
  90. <scope>test</scope>
  91. </dependency>
  92. <dependency>
  93. <groupId>org.junit.jupiter</groupId>
  94. <artifactId>junit-jupiter-engine</artifactId>
  95. <scope>test</scope>
  96. </dependency>
  97. <dependency>
  98. <groupId>org.junit.platform</groupId>
  99. <artifactId>junit-platform-launcher</artifactId>
  100. <scope>test</scope>
  101. </dependency>
  102. <dependency>
  103. <groupId>org.mockito</groupId>
  104. <artifactId>mockito-junit-jupiter</artifactId>
  105. <scope>test</scope>
  106. </dependency>
  107. <dependency>
  108. <groupId>org.slf4j</groupId>
  109. <artifactId>slf4j-api</artifactId>
  110. </dependency>
  111. <dependency>
  112. <groupId>org.mockito</groupId>
  113. <artifactId>mockito-junit-jupiter</artifactId>
  114. <scope>test</scope>
  115. </dependency>
  116. <dependency>
  117. <groupId>org.junit.vintage</groupId>
  118. <artifactId>junit-vintage-engine</artifactId>
  119. <scope>test</scope>
  120. </dependency>
  121. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  122. <dependency>
  123. <groupId>org.apache.hadoop</groupId>
  124. <artifactId>hadoop-annotations</artifactId>
  125. </dependency>
  126. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  127. <dependency>
  128. <groupId>org.apache.hadoop</groupId>
  129. <artifactId>hadoop-common</artifactId>
  130. <type>test-jar</type>
  131. <scope>test</scope>
  132. </dependency>
  133. <dependency>
  134. <groupId>com.google.inject.extensions</groupId>
  135. <artifactId>guice-servlet</artifactId>
  136. </dependency>
  137. <dependency>
  138. <groupId>io.dropwizard.metrics</groupId>
  139. <artifactId>metrics-core</artifactId>
  140. </dependency>
  141. <dependency>
  142. <groupId>junit</groupId>
  143. <artifactId>junit</artifactId>
  144. <scope>test</scope>
  145. </dependency>
  146. <dependency>
  147. <groupId>org.junit.jupiter</groupId>
  148. <artifactId>junit-jupiter-params</artifactId>
  149. <scope>test</scope>
  150. </dependency>
  151. <dependency>
  152. <groupId>org.mockito</groupId>
  153. <artifactId>mockito-inline</artifactId>
  154. <scope>test</scope>
  155. </dependency>
  156. <dependency>
  157. <groupId>org.assertj</groupId>
  158. <artifactId>assertj-core</artifactId>
  159. <scope>test</scope>
  160. </dependency>
  161. <dependency>
  162. <groupId>com.google.inject</groupId>
  163. <artifactId>guice</artifactId>
  164. <exclusions>
  165. <exclusion>
  166. <artifactId>javax.inject</artifactId>
  167. <groupId>javax.inject</groupId>
  168. </exclusion>
  169. </exclusions>
  170. </dependency>
  171. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  172. <dependency>
  173. <groupId>org.apache.hadoop</groupId>
  174. <artifactId>hadoop-yarn-common</artifactId>
  175. <type>test-jar</type>
  176. <scope>test</scope>
  177. </dependency>
  178. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  179. <dependency>
  180. <groupId>org.apache.hadoop</groupId>
  181. <artifactId>hadoop-yarn-server-common</artifactId>
  182. </dependency>
  183. <dependency>
  184. <groupId>${leveldbjni.group}</groupId>
  185. <artifactId>leveldbjni-all</artifactId>
  186. </dependency>
  187. <dependency>
  188. <groupId>net.java.dev.jna</groupId>
  189. <artifactId>jna</artifactId>
  190. </dependency>
  191. <dependency>
  192. <groupId>org.apache.hadoop</groupId>
  193. <artifactId>hadoop-yarn-server-common</artifactId>
  194. <type>test-jar</type>
  195. <scope>test</scope>
  196. </dependency>
  197. <dependency>
  198. <groupId>org.apache.hadoop</groupId>
  199. <artifactId>hadoop-minikdc</artifactId>
  200. <scope>test</scope>
  201. </dependency>
  202. <dependency>
  203. <groupId>org.apache.commons</groupId>
  204. <artifactId>commons-lang3</artifactId>
  205. </dependency>
  206. <dependency>
  207. <groupId>org.glassfish.jersey.test-framework</groupId>
  208. <artifactId>jersey-test-framework-core</artifactId>
  209. <scope>test</scope>
  210. </dependency>
  211. <dependency>
  212. <groupId>org.glassfish.jersey.test-framework.providers</groupId>
  213. <artifactId>jersey-test-framework-provider-jetty</artifactId>
  214. <scope>test</scope>
  215. </dependency>
  216. <dependency>
  217. <groupId>org.glassfish.jersey.inject</groupId>
  218. <artifactId>jersey-hk2</artifactId>
  219. <scope>runtime</scope>
  220. </dependency>
  221. <dependency>
  222. <groupId>org.glassfish.jersey.media</groupId>
  223. <artifactId>jersey-media-jaxb</artifactId>
  224. <scope>test</scope>
  225. </dependency>
  226. <dependency>
  227. <groupId>org.glassfish.jersey.media</groupId>
  228. <artifactId>jersey-media-json-jettison</artifactId>
  229. </dependency>
  230. </dependencies>
  231. <profiles>
  232. <profile>
  233. <id>native</id>
  234. <build>
  235. <plugins>
  236. <plugin>
  237. <groupId>org.apache.hadoop</groupId>
  238. <artifactId>hadoop-maven-plugins</artifactId>
  239. <executions>
  240. <execution>
  241. <id>cmake-compile</id>
  242. <phase>compile</phase>
  243. <goals><goal>cmake-compile</goal></goals>
  244. <configuration>
  245. <source>${basedir}/src</source>
  246. <vars>
  247. <HADOOP_CONF_DIR>${container-executor.conf.dir}</HADOOP_CONF_DIR>
  248. <JVM_ARCH_DATA_MODEL>${sun.arch.data.model}</JVM_ARCH_DATA_MODEL>
  249. </vars>
  250. <env>
  251. <CFLAGS>${container-executor.additional_cflags}</CFLAGS>
  252. </env>
  253. </configuration>
  254. </execution>
  255. <execution>
  256. <id>test-container-executor</id>
  257. <goals><goal>cmake-test</goal></goals>
  258. <phase>test</phase>
  259. <configuration>
  260. <binary>${project.build.directory}/native/target/usr/local/bin/test-container-executor</binary>
  261. <timeout>300</timeout>
  262. <results>${project.build.directory}/native-results</results>
  263. </configuration>
  264. </execution>
  265. <execution>
  266. <id>cetest</id>
  267. <goals><goal>cmake-test</goal></goals>
  268. <phase>test</phase>
  269. <configuration>
  270. <!-- this should match the xml name without the TEST-part down below -->
  271. <testName>cetest</testName>
  272. <workingDirectory>${project.build.directory}/native/test</workingDirectory>
  273. <source>${basedir}/src</source>
  274. <binary>${project.build.directory}/native/test/cetest</binary>
  275. <args>
  276. <arg>--gtest_filter=-Perf.</arg>
  277. <arg>--gtest_output=xml:${project.build.directory}/surefire-reports/TEST-cetest.xml</arg>
  278. </args>
  279. <results>${project.build.directory}/surefire-reports</results>
  280. </configuration>
  281. </execution>
  282. </executions>
  283. </plugin>
  284. <plugin>
  285. <groupId>org.apache.maven.plugins</groupId>
  286. <artifactId>maven-antrun-plugin</artifactId>
  287. <executions>
  288. <execution>
  289. <id>make</id>
  290. <phase>compile</phase>
  291. <goals>
  292. <goal>run</goal>
  293. </goals>
  294. <configuration>
  295. <target>
  296. <copy todir="${project.build.directory}/native/test/"
  297. overwrite="true">
  298. <fileset dir="${basedir}/src/main/native/container-executor/resources/test" />
  299. </copy>
  300. </target>
  301. </configuration>
  302. </execution>
  303. </executions>
  304. </plugin>
  305. </plugins>
  306. </build>
  307. <activation>
  308. <activeByDefault>false</activeByDefault>
  309. </activation>
  310. </profile>
  311. <profile>
  312. <id>visualize</id>
  313. <activation>
  314. <activeByDefault>false</activeByDefault>
  315. </activation>
  316. <build>
  317. <plugins>
  318. <plugin>
  319. <groupId>org.codehaus.mojo</groupId>
  320. <artifactId>exec-maven-plugin</artifactId>
  321. <executions>
  322. <execution>
  323. <phase>compile</phase>
  324. <goals>
  325. <goal>java</goal>
  326. </goals>
  327. <configuration>
  328. <mainClass>org.apache.hadoop.yarn.state.VisualizeStateMachine</mainClass>
  329. <classpathScope>compile</classpathScope>
  330. <arguments>
  331. <argument>NodeManager</argument>
  332. <argument>org.apache.hadoop.yarn.server.nodemanager.containermanager.application.ApplicationImpl,
  333. org.apache.hadoop.yarn.server.nodemanager.containermanager.container.ContainerImpl,
  334. org.apache.hadoop.yarn.server.nodemanager.containermanager.localizer.LocalizedResource</argument>
  335. <argument>NodeManager.gv</argument>
  336. </arguments>
  337. </configuration>
  338. </execution>
  339. </executions>
  340. </plugin>
  341. </plugins>
  342. </build>
  343. </profile>
  344. <profile>
  345. <id>native-win</id>
  346. <activation>
  347. <os>
  348. <family>Windows</family>
  349. </os>
  350. </activation>
  351. <build>
  352. <plugins>
  353. <plugin>
  354. <groupId>org.apache.maven.plugins</groupId>
  355. <artifactId>maven-surefire-plugin</artifactId>
  356. <configuration>
  357. <excludes>
  358. <exclude>org.apache.hadoop.yarn.server.nodemanager.containermanager.linux.**</exclude>
  359. </excludes>
  360. </configuration>
  361. </plugin>
  362. </plugins>
  363. </build>
  364. </profile>
  365. </profiles>
  366. <build>
  367. <plugins>
  368. <plugin>
  369. <artifactId>maven-surefire-plugin</artifactId>
  370. <configuration>
  371. <systemPropertyVariables>
  372. <property>
  373. <name>container-executor.path</name>
  374. <value>${container-executor.path}</value>
  375. </property>
  376. <property>
  377. <name>application.submitter</name>
  378. <value>${application.submitter}</value>
  379. </property>
  380. <property>
  381. <name>yarn.log.dir</name>
  382. <value>${maven.project.build.directory}/logs</value>
  383. </property>
  384. </systemPropertyVariables>
  385. <excludes>
  386. <exclude>**/TestFSDownload.java</exclude>
  387. </excludes>
  388. </configuration>
  389. </plugin>
  390. <plugin>
  391. <groupId>org.apache.rat</groupId>
  392. <artifactId>apache-rat-plugin</artifactId>
  393. <configuration>
  394. <excludes>
  395. <exclude>src/main/native/container-executor/impl/compat/fstatat.h</exclude>
  396. <exclude>src/main/native/container-executor/impl/compat/openat.h</exclude>
  397. <exclude>src/main/native/container-executor/impl/compat/unlinkat.h</exclude>
  398. <exclude>src/main/resources/TERMINAL/xterm/**/*</exclude>
  399. </excludes>
  400. </configuration>
  401. </plugin>
  402. <plugin>
  403. <groupId>org.xolstice.maven.plugins</groupId>
  404. <artifactId>protobuf-maven-plugin</artifactId>
  405. <executions>
  406. <execution>
  407. <id>src-compile-protoc</id>
  408. <configuration>
  409. <skip>false</skip>
  410. <additionalProtoPathElements>
  411. <additionalProtoPathElement>
  412. ${basedir}/../../../../hadoop-common-project/hadoop-common/src/main/proto
  413. </additionalProtoPathElement>
  414. <additionalProtoPathElement>
  415. ${basedir}/../../hadoop-yarn-api/src/main/proto
  416. </additionalProtoPathElement>
  417. </additionalProtoPathElements>
  418. </configuration>
  419. </execution>
  420. </executions>
  421. </plugin>
  422. <plugin>
  423. <groupId>com.google.code.maven-replacer-plugin</groupId>
  424. <artifactId>replacer</artifactId>
  425. <executions>
  426. <execution>
  427. <id>replace-generated-sources</id>
  428. <configuration>
  429. <skip>false</skip>
  430. </configuration>
  431. </execution>
  432. <execution>
  433. <id>replace-sources</id>
  434. <configuration>
  435. <skip>false</skip>
  436. </configuration>
  437. </execution>
  438. <execution>
  439. <id>replace-test-sources</id>
  440. <configuration>
  441. <skip>false</skip>
  442. </configuration>
  443. </execution>
  444. </executions>
  445. </plugin>
  446. </plugins>
  447. </build>
  448. </project>