pom.xml 15 KB

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