pom.xml 7.6 KB

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