pom.xml 7.3 KB

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