pom.xml 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  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. </profiles>
  102. <build>
  103. <plugins>
  104. <plugin>
  105. <artifactId>maven-surefire-plugin</artifactId>
  106. <configuration>
  107. <systemPropertyVariables>
  108. <property>
  109. <name>container-executor-path</name>
  110. <value></value>
  111. </property>
  112. </systemPropertyVariables>
  113. <excludes>
  114. <exclude>**/TestFSDownload.java</exclude>
  115. </excludes>
  116. </configuration>
  117. </plugin>
  118. <plugin>
  119. <artifactId>maven-antrun-plugin</artifactId>
  120. <executions>
  121. <execution>
  122. <id>create-protobuf-generated-sources-directory</id>
  123. <phase>initialize</phase>
  124. <configuration>
  125. <target>
  126. <mkdir dir="target/generated-sources/proto" />
  127. </target>
  128. </configuration>
  129. <goals>
  130. <goal>run</goal>
  131. </goals>
  132. </execution>
  133. </executions>
  134. </plugin>
  135. <plugin>
  136. <groupId>org.codehaus.mojo</groupId>
  137. <artifactId>exec-maven-plugin</artifactId>
  138. <executions>
  139. <execution>
  140. <id>generate-sources</id>
  141. <phase>generate-sources</phase>
  142. <configuration>
  143. <executable>protoc</executable>
  144. <arguments>
  145. <argument>-I../../hadoop-yarn-api/src/main/proto/</argument>
  146. <argument>-Isrc/main/proto/</argument>
  147. <argument>--java_out=target/generated-sources/proto</argument>
  148. <argument>src/main/proto/yarn_server_nodemanager_service_protos.proto</argument>
  149. <argument>src/main/proto/LocalizationProtocol.proto</argument>
  150. </arguments>
  151. </configuration>
  152. <goals>
  153. <goal>exec</goal>
  154. </goals>
  155. </execution>
  156. </executions>
  157. </plugin>
  158. <plugin>
  159. <groupId>org.codehaus.mojo</groupId>
  160. <artifactId>build-helper-maven-plugin</artifactId>
  161. <executions>
  162. <execution>
  163. <id>add-source</id>
  164. <phase>generate-sources</phase>
  165. <goals>
  166. <goal>add-source</goal>
  167. </goals>
  168. <configuration>
  169. <sources>
  170. <source>target/generated-sources/proto</source>
  171. </sources>
  172. </configuration>
  173. </execution>
  174. </executions>
  175. </plugin>
  176. </plugins>
  177. </build>
  178. </project>