pom.xml 14 KB

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