pom.xml 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <?xml version="1.0"?>
  2. <project>
  3. <parent>
  4. <artifactId>hadoop-mapreduce-client</artifactId>
  5. <groupId>org.apache.hadoop</groupId>
  6. <version>${hadoop-mapreduce.version}</version>
  7. </parent>
  8. <modelVersion>4.0.0</modelVersion>
  9. <groupId>org.apache.hadoop</groupId>
  10. <artifactId>hadoop-mapreduce-client-common</artifactId>
  11. <name>hadoop-mapreduce-client-common</name>
  12. <properties>
  13. <install.file>${project.artifact.file}</install.file>
  14. <mr.basedir>${project.parent.parent.basedir}</mr.basedir>
  15. </properties>
  16. <dependencies>
  17. <dependency>
  18. <groupId>org.apache.hadoop</groupId>
  19. <artifactId>hadoop-yarn-common</artifactId>
  20. </dependency>
  21. <dependency>
  22. <groupId>org.apache.hadoop</groupId>
  23. <artifactId>hadoop-mapreduce-client-core</artifactId>
  24. </dependency>
  25. </dependencies>
  26. <build>
  27. <plugins>
  28. <plugin>
  29. <artifactId>maven-antrun-plugin</artifactId>
  30. <executions>
  31. <execution>
  32. <id>create-protobuf-generated-sources-directory</id>
  33. <phase>initialize</phase>
  34. <configuration>
  35. <target>
  36. <mkdir dir="target/generated-sources/proto" />
  37. </target>
  38. </configuration>
  39. <goals>
  40. <goal>run</goal>
  41. </goals>
  42. </execution>
  43. </executions>
  44. </plugin>
  45. <plugin>
  46. <groupId>org.codehaus.mojo</groupId>
  47. <artifactId>exec-maven-plugin</artifactId>
  48. <executions>
  49. <execution>
  50. <id>generate-sources</id>
  51. <phase>generate-sources</phase>
  52. <configuration>
  53. <executable>protoc</executable>
  54. <arguments>
  55. <argument>-I../../hadoop-yarn/hadoop-yarn-api/src/main/proto/</argument>
  56. <argument>-Isrc/main/proto/</argument>
  57. <argument>--java_out=target/generated-sources/proto</argument>
  58. <argument>src/main/proto/mr_protos.proto</argument>
  59. <argument>src/main/proto/mr_service_protos.proto</argument>
  60. <argument>src/main/proto/MRClientProtocol.proto</argument>
  61. </arguments>
  62. </configuration>
  63. <goals>
  64. <goal>exec</goal>
  65. </goals>
  66. </execution>
  67. </executions>
  68. </plugin>
  69. <plugin>
  70. <groupId>org.codehaus.mojo</groupId>
  71. <artifactId>build-helper-maven-plugin</artifactId>
  72. <executions>
  73. <execution>
  74. <id>add-source</id>
  75. <phase>generate-sources</phase>
  76. <goals>
  77. <goal>add-source</goal>
  78. </goals>
  79. <configuration>
  80. <sources>
  81. <source>target/generated-sources/proto</source>
  82. </sources>
  83. </configuration>
  84. </execution>
  85. </executions>
  86. </plugin>
  87. </plugins>
  88. </build>
  89. </project>