pom.xml 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  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. <executions>
  48. <execution>
  49. <id>make</id>
  50. <phase>compile</phase>
  51. <goals><goal>run</goal></goals>
  52. <configuration>
  53. <target>
  54. <mkdir dir="${project.build.directory}/native/target"/>
  55. <exec executable="cmake" dir="${project.build.directory}/native" failonerror="true">
  56. <arg line="${basedir}/src/ -DHADOOP_CONF_DIR=${container-executor.conf.dir} -DJVM_ARCH_DATA_MODEL=${sun.arch.data.model}"/>
  57. <env key="CFLAGS" value="${container-executor.additional_cflags}"/>
  58. </exec>
  59. <exec executable="make" dir="${project.build.directory}/native" failonerror="true">
  60. <arg line="VERBOSE=1"/>
  61. </exec>
  62. </target>
  63. </configuration>
  64. </execution>
  65. <execution>
  66. <id>native_tests</id>
  67. <phase>test</phase>
  68. <configuration>
  69. <target>
  70. <exec executable="test-container-executor" dir="${project.build.directory}/native" failonerror="true">
  71. </exec>
  72. </target>
  73. </configuration>
  74. </execution>
  75. </executions>
  76. </plugin>
  77. </plugins>
  78. </build>
  79. <activation>
  80. <activeByDefault>false</activeByDefault>
  81. </activation>
  82. </profile>
  83. <profile>
  84. <id>visualize</id>
  85. <activation>
  86. <activeByDefault>false</activeByDefault>
  87. </activation>
  88. <build>
  89. <plugins>
  90. <plugin>
  91. <groupId>org.codehaus.mojo</groupId>
  92. <artifactId>exec-maven-plugin</artifactId>
  93. <executions>
  94. <execution>
  95. <phase>compile</phase>
  96. <goals>
  97. <goal>java</goal>
  98. </goals>
  99. <configuration>
  100. <mainClass>org.apache.hadoop.yarn.util.VisualizeStateMachine</mainClass>
  101. <classpathScope>compile</classpathScope>
  102. <arguments>
  103. <argument>NodeManager</argument>
  104. <argument>org.apache.hadoop.yarn.server.nodemanager.containermanager.application.ApplicationImpl,
  105. org.apache.hadoop.yarn.server.nodemanager.containermanager.container.ContainerImpl,
  106. org.apache.hadoop.yarn.server.nodemanager.containermanager.localizer.LocalizedResource</argument>
  107. <argument>NodeManager.gv</argument>
  108. </arguments>
  109. </configuration>
  110. </execution>
  111. </executions>
  112. </plugin>
  113. </plugins>
  114. </build>
  115. </profile>
  116. </profiles>
  117. <build>
  118. <plugins>
  119. <plugin>
  120. <artifactId>maven-surefire-plugin</artifactId>
  121. <configuration>
  122. <systemPropertyVariables>
  123. <property>
  124. <name>container-executor.path</name>
  125. <value>${container-executor.path}</value>
  126. </property>
  127. <property>
  128. <name>application.submitter</name>
  129. <value>${application.submitter}</value>
  130. </property>
  131. </systemPropertyVariables>
  132. <excludes>
  133. <exclude>**/TestFSDownload.java</exclude>
  134. </excludes>
  135. </configuration>
  136. </plugin>
  137. <plugin>
  138. <artifactId>maven-antrun-plugin</artifactId>
  139. <executions>
  140. <execution>
  141. <id>create-protobuf-generated-sources-directory</id>
  142. <phase>initialize</phase>
  143. <configuration>
  144. <target>
  145. <mkdir dir="target/generated-sources/proto" />
  146. </target>
  147. </configuration>
  148. <goals>
  149. <goal>run</goal>
  150. </goals>
  151. </execution>
  152. <execution>
  153. <id>compile</id>
  154. <phase>generate-sources</phase>
  155. <goals>
  156. <goal>run</goal>
  157. </goals>
  158. </execution>
  159. </executions>
  160. </plugin>
  161. <plugin>
  162. <groupId>org.codehaus.mojo</groupId>
  163. <artifactId>exec-maven-plugin</artifactId>
  164. <executions>
  165. <execution>
  166. <id>generate-sources</id>
  167. <phase>generate-sources</phase>
  168. <configuration>
  169. <executable>protoc</executable>
  170. <arguments>
  171. <argument>-I../../hadoop-yarn-api/src/main/proto/</argument>
  172. <argument>-Isrc/main/proto/</argument>
  173. <argument>--java_out=target/generated-sources/proto</argument>
  174. <argument>src/main/proto/yarn_server_nodemanager_service_protos.proto</argument>
  175. <argument>src/main/proto/LocalizationProtocol.proto</argument>
  176. </arguments>
  177. </configuration>
  178. <goals>
  179. <goal>exec</goal>
  180. </goals>
  181. </execution>
  182. </executions>
  183. </plugin>
  184. <plugin>
  185. <groupId>org.codehaus.mojo</groupId>
  186. <artifactId>build-helper-maven-plugin</artifactId>
  187. <executions>
  188. <execution>
  189. <id>add-source</id>
  190. <phase>generate-sources</phase>
  191. <goals>
  192. <goal>add-source</goal>
  193. </goals>
  194. <configuration>
  195. <sources>
  196. <source>target/generated-sources/proto</source>
  197. </sources>
  198. </configuration>
  199. </execution>
  200. </executions>
  201. </plugin>
  202. </plugins>
  203. </build>
  204. </project>