pom.xml 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  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.0.0-SNAPSHOT</version>
  21. </parent>
  22. <modelVersion>4.0.0</modelVersion>
  23. <groupId>org.apache.hadoop</groupId>
  24. <artifactId>hadoop-yarn-server-nodemanager</artifactId>
  25. <version>3.0.0-SNAPSHOT</version>
  26. <name>hadoop-yarn-server-nodemanager</name>
  27. <properties>
  28. <!-- Basedir eeded for generating FindBugs warnings using parent pom -->
  29. <yarn.basedir>${project.parent.parent.basedir}</yarn.basedir>
  30. <container-executor.conf.dir>../etc/hadoop</container-executor.conf.dir>
  31. <container-executor.additional_cflags></container-executor.additional_cflags>
  32. </properties>
  33. <dependencies>
  34. <dependency>
  35. <groupId>org.apache.hadoop</groupId>
  36. <artifactId>hadoop-yarn-server-common</artifactId>
  37. </dependency>
  38. </dependencies>
  39. <profiles>
  40. <profile>
  41. <id>native</id>
  42. <build>
  43. <plugins>
  44. <plugin>
  45. <groupId>org.apache.maven.plugins</groupId>
  46. <artifactId>maven-antrun-plugin</artifactId>
  47. <configuration>
  48. <skipTests>false</skipTests>
  49. </configuration>
  50. <executions>
  51. <execution>
  52. <id>make</id>
  53. <phase>compile</phase>
  54. <goals><goal>run</goal></goals>
  55. <configuration>
  56. <target>
  57. <mkdir dir="${project.build.directory}/native/target"/>
  58. <exec executable="cmake" dir="${project.build.directory}/native" failonerror="true">
  59. <arg line="${basedir}/src/ -DHADOOP_CONF_DIR=${container-executor.conf.dir} -DJVM_ARCH_DATA_MODEL=${sun.arch.data.model}"/>
  60. <env key="CFLAGS" value="${container-executor.additional_cflags}"/>
  61. </exec>
  62. <exec executable="make" dir="${project.build.directory}/native" failonerror="true">
  63. <arg line="VERBOSE=1"/>
  64. </exec>
  65. <!-- The second make is a workaround for HADOOP-9215. It can
  66. be removed when version 2.6 of cmake is no longer supported . -->
  67. <exec executable="make" dir="${project.build.directory}/native" failonerror="true"></exec>
  68. </target>
  69. </configuration>
  70. </execution>
  71. <execution>
  72. <id>native_tests</id>
  73. <phase>test</phase>
  74. <configuration>
  75. <target>
  76. <exec executable="sh" failonerror="true" dir="${project.build.directory}/native">
  77. <arg value="-c"/>
  78. <arg value="[ x$SKIPTESTS = xtrue ] || test-container-executor"/>
  79. <env key="SKIPTESTS" value="${skipTests}"/>
  80. </exec>
  81. </target>
  82. </configuration>
  83. </execution>
  84. </executions>
  85. </plugin>
  86. </plugins>
  87. </build>
  88. <activation>
  89. <activeByDefault>false</activeByDefault>
  90. </activation>
  91. </profile>
  92. <profile>
  93. <id>visualize</id>
  94. <activation>
  95. <activeByDefault>false</activeByDefault>
  96. </activation>
  97. <build>
  98. <plugins>
  99. <plugin>
  100. <groupId>org.codehaus.mojo</groupId>
  101. <artifactId>exec-maven-plugin</artifactId>
  102. <executions>
  103. <execution>
  104. <phase>compile</phase>
  105. <goals>
  106. <goal>java</goal>
  107. </goals>
  108. <configuration>
  109. <mainClass>org.apache.hadoop.yarn.util.VisualizeStateMachine</mainClass>
  110. <classpathScope>compile</classpathScope>
  111. <arguments>
  112. <argument>NodeManager</argument>
  113. <argument>org.apache.hadoop.yarn.server.nodemanager.containermanager.application.ApplicationImpl,
  114. org.apache.hadoop.yarn.server.nodemanager.containermanager.container.ContainerImpl,
  115. org.apache.hadoop.yarn.server.nodemanager.containermanager.localizer.LocalizedResource</argument>
  116. <argument>NodeManager.gv</argument>
  117. </arguments>
  118. </configuration>
  119. </execution>
  120. </executions>
  121. </plugin>
  122. </plugins>
  123. </build>
  124. </profile>
  125. </profiles>
  126. <build>
  127. <plugins>
  128. <plugin>
  129. <artifactId>maven-surefire-plugin</artifactId>
  130. <configuration>
  131. <systemPropertyVariables>
  132. <property>
  133. <name>container-executor.path</name>
  134. <value>${container-executor.path}</value>
  135. </property>
  136. <property>
  137. <name>application.submitter</name>
  138. <value>${application.submitter}</value>
  139. </property>
  140. </systemPropertyVariables>
  141. <excludes>
  142. <exclude>**/TestFSDownload.java</exclude>
  143. </excludes>
  144. </configuration>
  145. </plugin>
  146. <plugin>
  147. <artifactId>maven-antrun-plugin</artifactId>
  148. <executions>
  149. <execution>
  150. <id>create-protobuf-generated-sources-directory</id>
  151. <phase>initialize</phase>
  152. <configuration>
  153. <target>
  154. <mkdir dir="target/generated-sources/proto" />
  155. </target>
  156. </configuration>
  157. <goals>
  158. <goal>run</goal>
  159. </goals>
  160. </execution>
  161. <execution>
  162. <id>compile</id>
  163. <phase>generate-sources</phase>
  164. <goals>
  165. <goal>run</goal>
  166. </goals>
  167. </execution>
  168. </executions>
  169. </plugin>
  170. <plugin>
  171. <groupId>org.codehaus.mojo</groupId>
  172. <artifactId>exec-maven-plugin</artifactId>
  173. <executions>
  174. <execution>
  175. <id>generate-sources</id>
  176. <phase>generate-sources</phase>
  177. <configuration>
  178. <executable>protoc</executable>
  179. <arguments>
  180. <argument>-I../../../../hadoop-common-project/hadoop-common/src/main/proto/</argument>
  181. <argument>-I../../hadoop-yarn-api/src/main/proto/</argument>
  182. <argument>-Isrc/main/proto/</argument>
  183. <argument>--java_out=target/generated-sources/proto</argument>
  184. <argument>src/main/proto/yarn_server_nodemanager_service_protos.proto</argument>
  185. <argument>src/main/proto/LocalizationProtocol.proto</argument>
  186. </arguments>
  187. </configuration>
  188. <goals>
  189. <goal>exec</goal>
  190. </goals>
  191. </execution>
  192. </executions>
  193. </plugin>
  194. <plugin>
  195. <groupId>org.codehaus.mojo</groupId>
  196. <artifactId>build-helper-maven-plugin</artifactId>
  197. <executions>
  198. <execution>
  199. <id>add-source</id>
  200. <phase>generate-sources</phase>
  201. <goals>
  202. <goal>add-source</goal>
  203. </goals>
  204. <configuration>
  205. <sources>
  206. <source>target/generated-sources/proto</source>
  207. </sources>
  208. </configuration>
  209. </execution>
  210. </executions>
  211. </plugin>
  212. </plugins>
  213. </build>
  214. </project>