pom.xml 7.5 KB

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