pom.xml 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project xmlns="http://maven.apache.org/POM/4.0.0"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  5. <parent>
  6. <artifactId>recommend-server</artifactId>
  7. <groupId>com.tzld.piaoquan</groupId>
  8. <version>1.0.0</version>
  9. </parent>
  10. <modelVersion>4.0.0</modelVersion>
  11. <artifactId>recommend-server-client</artifactId>
  12. <version>1.0.0</version>
  13. <dependencies>
  14. <dependency>
  15. <groupId>net.devh</groupId>
  16. <artifactId>grpc-client-spring-boot-starter</artifactId>
  17. <version>2.9.0.RELEASE</version>
  18. </dependency>
  19. <dependency>
  20. <groupId>com.google.protobuf</groupId>
  21. <artifactId>protobuf-java</artifactId>
  22. <version>3.12.0</version>
  23. </dependency>
  24. <dependency>
  25. <groupId>org.projectlombok</groupId>
  26. <artifactId>lombok</artifactId>
  27. <version>1.16.8</version>
  28. </dependency>
  29. <dependency>
  30. <groupId>com.google.protobuf</groupId>
  31. <artifactId>protobuf-java-util</artifactId>
  32. <version>3.6.0</version>
  33. </dependency>
  34. </dependencies>
  35. <build>
  36. <extensions>
  37. <extension>
  38. <groupId>kr.motd.maven</groupId>
  39. <artifactId>os-maven-plugin</artifactId>
  40. <version>1.6.0</version>
  41. </extension>
  42. </extensions>
  43. <plugins>
  44. <plugin>
  45. <groupId>org.xolstice.maven.plugins</groupId>
  46. <artifactId>protobuf-maven-plugin</artifactId>
  47. <version>0.6.1</version>
  48. <configuration>
  49. <protocArtifact>com.google.protobuf:protoc:3.12.0:exe:${os.detected.classifier}</protocArtifact>
  50. <pluginId>grpc-java</pluginId>
  51. <pluginArtifact>io.grpc:protoc-gen-grpc-java:1.34.1:exe:${os.detected.classifier}</pluginArtifact>
  52. <!--设置grpc生成代码到指定路径-->
  53. <outputDirectory>${project.basedir}/src/main/java</outputDirectory>
  54. <!--生成代码前是否清空目录-->
  55. <clearOutputDirectory>false</clearOutputDirectory>
  56. </configuration>
  57. <executions>
  58. <execution>
  59. <goals>
  60. <goal>compile</goal>
  61. <goal>compile-custom</goal>
  62. </goals>
  63. </execution>
  64. </executions>
  65. </plugin>
  66. <!-- 设置多个源文件夹 -->
  67. <plugin>
  68. <groupId>org.codehaus.mojo</groupId>
  69. <artifactId>build-helper-maven-plugin</artifactId>
  70. <version>3.0.0</version>
  71. <executions>
  72. <!-- 添加主源码目录 -->
  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>${project.basedir}/src/main/java</source>
  82. </sources>
  83. </configuration>
  84. </execution>
  85. </executions>
  86. </plugin>
  87. </plugins>
  88. </build>
  89. </project>