pom.xml 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. <?xml version="1.0"?>
  2. <project>
  3. <parent>
  4. <artifactId>hadoop-yarn-server</artifactId>
  5. <groupId>org.apache.hadoop</groupId>
  6. <version>${yarn.version}</version>
  7. </parent>
  8. <modelVersion>4.0.0</modelVersion>
  9. <groupId>org.apache.hadoop</groupId>
  10. <artifactId>hadoop-yarn-server-nodemanager</artifactId>
  11. <name>hadoop-yarn-server-nodemanager</name>
  12. <properties>
  13. <install.file>${project.artifact.file}</install.file>
  14. <yarn.basedir>${project.parent.parent.basedir}</yarn.basedir>
  15. </properties>
  16. <dependencies>
  17. <dependency>
  18. <groupId>org.apache.hadoop</groupId>
  19. <artifactId>hadoop-yarn-server-common</artifactId>
  20. </dependency>
  21. </dependencies>
  22. <profiles>
  23. <profile>
  24. <id>cbuild</id>
  25. <build>
  26. <plugins>
  27. <plugin>
  28. <groupId>org.codehaus.mojo</groupId>
  29. <artifactId>make-maven-plugin</artifactId>
  30. <version>1.0-beta-1</version>
  31. <executions>
  32. <execution>
  33. <id>autoreconf</id>
  34. <phase>package</phase>
  35. <configuration>
  36. <arguments>
  37. <argument>-i</argument>
  38. </arguments>
  39. <workDir>src/main/c/container-executor</workDir>
  40. </configuration>
  41. <goals>
  42. <goal>autoreconf</goal>
  43. </goals>
  44. </execution>
  45. <execution>
  46. <id>make</id>
  47. <phase>package</phase>
  48. <configuration>
  49. <workDir>src/main/c/container-executor</workDir>
  50. <configureEnvironment>
  51. <property>
  52. <name>CFLAGS</name>
  53. <value>-DHADOOP_CONF_DIR=${container-executor.conf.dir}</value>
  54. </property>
  55. </configureEnvironment>
  56. <sources>
  57. <source>
  58. <directory>src/main/c/container-executor</directory>
  59. </source>
  60. </sources>
  61. <workDir>src/main/c/container-executor</workDir>
  62. <destDir>target</destDir>
  63. <prefix>${project.build.outputDirectory}</prefix>
  64. </configuration>
  65. <goals>
  66. <!-- always clean, to ensure conf dir regenerated -->
  67. <goal>make-clean</goal>
  68. <goal>configure</goal>
  69. </goals>
  70. </execution>
  71. <execution>
  72. <id>install</id>
  73. <phase>package</phase>
  74. <configuration>
  75. <destDir>/</destDir>
  76. <workDir>src/main/c/container-executor</workDir>
  77. </configuration>
  78. <goals>
  79. <goal>make-install</goal>
  80. </goals>
  81. </execution>
  82. </executions>
  83. </plugin>
  84. </plugins>
  85. </build>
  86. <activation>
  87. <activeByDefault>true</activeByDefault>
  88. </activation>
  89. </profile>
  90. </profiles>
  91. <build>
  92. <plugins>
  93. <plugin>
  94. <artifactId>maven-surefire-plugin</artifactId>
  95. <configuration>
  96. <systemPropertyVariables>
  97. <property>
  98. <name>container-executor-path</name>
  99. <value></value>
  100. </property>
  101. </systemPropertyVariables>
  102. <excludes>
  103. <exclude>**/TestFSDownload.java</exclude>
  104. </excludes>
  105. </configuration>
  106. </plugin>
  107. <plugin>
  108. <artifactId>maven-antrun-plugin</artifactId>
  109. <executions>
  110. <execution>
  111. <id>create-protobuf-generated-sources-directory</id>
  112. <phase>initialize</phase>
  113. <configuration>
  114. <target>
  115. <mkdir dir="target/generated-sources/proto" />
  116. </target>
  117. </configuration>
  118. <goals>
  119. <goal>run</goal>
  120. </goals>
  121. </execution>
  122. </executions>
  123. </plugin>
  124. <plugin>
  125. <groupId>org.codehaus.mojo</groupId>
  126. <artifactId>exec-maven-plugin</artifactId>
  127. <executions>
  128. <execution>
  129. <id>generate-sources</id>
  130. <phase>generate-sources</phase>
  131. <configuration>
  132. <executable>protoc</executable>
  133. <arguments>
  134. <argument>-I../../hadoop-yarn-api/src/main/proto/</argument>
  135. <argument>-Isrc/main/proto/</argument>
  136. <argument>--java_out=target/generated-sources/proto</argument>
  137. <argument>src/main/proto/yarn_server_nodemanager_service_protos.proto</argument>
  138. <argument>src/main/proto/LocalizationProtocol.proto</argument>
  139. </arguments>
  140. </configuration>
  141. <goals>
  142. <goal>exec</goal>
  143. </goals>
  144. </execution>
  145. </executions>
  146. </plugin>
  147. <plugin>
  148. <groupId>org.codehaus.mojo</groupId>
  149. <artifactId>build-helper-maven-plugin</artifactId>
  150. <executions>
  151. <execution>
  152. <id>add-source</id>
  153. <phase>generate-sources</phase>
  154. <goals>
  155. <goal>add-source</goal>
  156. </goals>
  157. <configuration>
  158. <sources>
  159. <source>target/generated-sources/proto</source>
  160. </sources>
  161. </configuration>
  162. </execution>
  163. </executions>
  164. </plugin>
  165. </plugins>
  166. </build>
  167. </project>