pom.xml 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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.18.24</version>
  28. </dependency>
  29. </dependencies>
  30. <build>
  31. <extensions>
  32. <extension>
  33. <groupId>kr.motd.maven</groupId>
  34. <artifactId>os-maven-plugin</artifactId>
  35. <version>1.6.0</version>
  36. </extension>
  37. </extensions>
  38. <plugins>
  39. <plugin>
  40. <groupId>org.xolstice.maven.plugins</groupId>
  41. <artifactId>protobuf-maven-plugin</artifactId>
  42. <version>0.6.1</version>
  43. <configuration>
  44. <protocArtifact>com.google.protobuf:protoc:3.12.0:exe:${os.detected.classifier}</protocArtifact>
  45. <pluginId>grpc-java</pluginId>
  46. <pluginArtifact>io.grpc:protoc-gen-grpc-java:1.34.1:exe:${os.detected.classifier}</pluginArtifact>
  47. <!--设置grpc生成代码到指定路径-->
  48. <outputDirectory>${project.basedir}/src/main/java</outputDirectory>
  49. <!--生成代码前是否清空目录-->
  50. <clearOutputDirectory>false</clearOutputDirectory>
  51. </configuration>
  52. <executions>
  53. <execution>
  54. <goals>
  55. <goal>compile</goal>
  56. <goal>compile-custom</goal>
  57. </goals>
  58. </execution>
  59. </executions>
  60. </plugin>
  61. <!-- 设置多个源文件夹 -->
  62. <plugin>
  63. <groupId>org.codehaus.mojo</groupId>
  64. <artifactId>build-helper-maven-plugin</artifactId>
  65. <version>3.0.0</version>
  66. <executions>
  67. <!-- 添加主源码目录 -->
  68. <execution>
  69. <id>add-source</id>
  70. <phase>generate-sources</phase>
  71. <goals>
  72. <goal>add-source</goal>
  73. </goals>
  74. <configuration>
  75. <sources>
  76. <source>${project.basedir}/src/main/java</source>
  77. </sources>
  78. </configuration>
  79. </execution>
  80. </executions>
  81. </plugin>
  82. </plugins>
  83. </build>
  84. </project>