pom.xml 7.8 KB

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