pom.xml 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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.13</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. <exclusions>
  19. <exclusion>
  20. <groupId>io.grpc</groupId>
  21. <artifactId>*</artifactId>
  22. </exclusion>
  23. </exclusions>
  24. </dependency>
  25. <dependency>
  26. <groupId>io.grpc</groupId>
  27. <artifactId>grpc-netty-shaded</artifactId>
  28. </dependency>
  29. <dependency>
  30. <groupId>io.grpc</groupId>
  31. <artifactId>grpc-protobuf</artifactId>
  32. </dependency>
  33. <dependency>
  34. <groupId>io.grpc</groupId>
  35. <artifactId>grpc-stub</artifactId>
  36. </dependency>
  37. <dependency>
  38. <groupId>com.google.protobuf</groupId>
  39. <artifactId>protobuf-java</artifactId>
  40. <version>3.18.0</version>
  41. </dependency>
  42. <dependency>
  43. <groupId>org.projectlombok</groupId>
  44. <artifactId>lombok</artifactId>
  45. <version>1.16.8</version>
  46. </dependency>
  47. <dependency>
  48. <groupId>com.google.protobuf</groupId>
  49. <artifactId>protobuf-java-util</artifactId>
  50. <version>3.18.0</version>
  51. <exclusions>
  52. <exclusion>
  53. <artifactId>protobuf-java</artifactId>
  54. <groupId>com.google.protobuf</groupId>
  55. </exclusion>
  56. </exclusions>
  57. </dependency>
  58. </dependencies>
  59. <build>
  60. <extensions>
  61. <extension>
  62. <groupId>kr.motd.maven</groupId>
  63. <artifactId>os-maven-plugin</artifactId>
  64. <version>1.6.0</version>
  65. </extension>
  66. </extensions>
  67. <plugins>
  68. <plugin>
  69. <groupId>org.xolstice.maven.plugins</groupId>
  70. <artifactId>protobuf-maven-plugin</artifactId>
  71. <version>0.6.1</version>
  72. <configuration>
  73. <protocArtifact>com.google.protobuf:protoc:3.18.0:exe:${os.detected.classifier}</protocArtifact>
  74. <pluginId>grpc-java</pluginId>
  75. <pluginArtifact>io.grpc:protoc-gen-grpc-java:1.43.0:exe:${os.detected.classifier}</pluginArtifact>
  76. <!--设置grpc生成代码到指定路径-->
  77. <outputDirectory>${project.basedir}/src/main/java</outputDirectory>
  78. <!--生成代码前是否清空目录-->
  79. <clearOutputDirectory>false</clearOutputDirectory>
  80. </configuration>
  81. <executions>
  82. <execution>
  83. <goals>
  84. <goal>compile</goal>
  85. <goal>compile-custom</goal>
  86. </goals>
  87. </execution>
  88. </executions>
  89. </plugin>
  90. <!-- 设置多个源文件夹 -->
  91. <plugin>
  92. <groupId>org.codehaus.mojo</groupId>
  93. <artifactId>build-helper-maven-plugin</artifactId>
  94. <version>3.0.0</version>
  95. <executions>
  96. <!-- 添加主源码目录 -->
  97. <execution>
  98. <id>add-source</id>
  99. <phase>generate-sources</phase>
  100. <goals>
  101. <goal>add-source</goal>
  102. </goals>
  103. <configuration>
  104. <sources>
  105. <source>${project.basedir}/src/main/java</source>
  106. </sources>
  107. </configuration>
  108. </execution>
  109. </executions>
  110. </plugin>
  111. </plugins>
  112. </build>
  113. </project>