pom.xml 3.2 KB

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