pom.xml 3.8 KB

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