pom.xml 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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. <!-- 适配ad-engine 特殊版本号 -->
  13. <version>1.0.1.0.01</version>
  14. <dependencies>
  15. <dependency>
  16. <groupId>net.devh</groupId>
  17. <artifactId>grpc-client-spring-boot-starter</artifactId>
  18. <version>2.9.0.RELEASE</version>
  19. </dependency>
  20. <dependency>
  21. <groupId>com.google.protobuf</groupId>
  22. <artifactId>protobuf-java</artifactId>
  23. <version>3.12.0</version>
  24. </dependency>
  25. <dependency>
  26. <groupId>org.projectlombok</groupId>
  27. <artifactId>lombok</artifactId>
  28. <version>1.16.8</version>
  29. </dependency>
  30. <dependency>
  31. <groupId>com.google.protobuf</groupId>
  32. <artifactId>protobuf-java-util</artifactId>
  33. <version>3.6.0</version>
  34. <exclusions>
  35. <exclusion>
  36. <artifactId>protobuf-java</artifactId>
  37. <groupId>com.google.protobuf</groupId>
  38. </exclusion>
  39. </exclusions>
  40. </dependency>
  41. </dependencies>
  42. <build>
  43. <extensions>
  44. <extension>
  45. <groupId>kr.motd.maven</groupId>
  46. <artifactId>os-maven-plugin</artifactId>
  47. <version>1.6.0</version>
  48. </extension>
  49. </extensions>
  50. <plugins>
  51. <plugin>
  52. <groupId>org.xolstice.maven.plugins</groupId>
  53. <artifactId>protobuf-maven-plugin</artifactId>
  54. <version>0.6.1</version>
  55. <configuration>
  56. <protocArtifact>com.google.protobuf:protoc:3.12.0:exe:${os.detected.classifier}</protocArtifact>
  57. <pluginId>grpc-java</pluginId>
  58. <pluginArtifact>io.grpc:protoc-gen-grpc-java:1.34.1:exe:${os.detected.classifier}</pluginArtifact>
  59. <!--设置grpc生成代码到指定路径-->
  60. <outputDirectory>${project.basedir}/src/main/java</outputDirectory>
  61. <!--生成代码前是否清空目录-->
  62. <clearOutputDirectory>false</clearOutputDirectory>
  63. </configuration>
  64. <executions>
  65. <execution>
  66. <goals>
  67. <goal>compile</goal>
  68. <goal>compile-custom</goal>
  69. </goals>
  70. </execution>
  71. </executions>
  72. </plugin>
  73. <!-- 设置多个源文件夹 -->
  74. <plugin>
  75. <groupId>org.codehaus.mojo</groupId>
  76. <artifactId>build-helper-maven-plugin</artifactId>
  77. <version>3.0.0</version>
  78. <executions>
  79. <!-- 添加主源码目录 -->
  80. <execution>
  81. <id>add-source</id>
  82. <phase>generate-sources</phase>
  83. <goals>
  84. <goal>add-source</goal>
  85. </goals>
  86. <configuration>
  87. <sources>
  88. <source>${project.basedir}/src/main/java</source>
  89. </sources>
  90. </configuration>
  91. </execution>
  92. </executions>
  93. </plugin>
  94. </plugins>
  95. </build>
  96. </project>