pom.xml 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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. <modelVersion>4.0.0</modelVersion>
  6. <parent>
  7. <groupId>com.ywt</groupId>
  8. <artifactId>ywt-platform-glasses-parent</artifactId>
  9. <version>1.0.0-SNAPSHOT</version>
  10. <!-- <relativePath>../pom.xml</relativePath>-->
  11. </parent>
  12. <artifactId>ywt-platform-glasses-base</artifactId>
  13. <description>用于定义grpc生成文件 以及 报漏外部接口定义</description>
  14. <dependencies>
  15. <dependency>
  16. <groupId>org.apache.dubbo</groupId>
  17. <artifactId>dubbo-spring-boot-starter</artifactId>
  18. </dependency>
  19. <dependency>
  20. <groupId>com.google.protobuf</groupId>
  21. <artifactId>protobuf-java</artifactId>
  22. <version>3.19.6</version>
  23. <!-- <version>${protobuf.version}</version>-->
  24. </dependency>
  25. <dependency>
  26. <groupId>io.springfox</groupId>
  27. <artifactId>springfox-swagger2</artifactId>
  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.2</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. <!-- ${os.detected.classifier} m2芯片不适用 -->
  45. <protocArtifact>com.google.protobuf:protoc:3.19.4:exe:${os.detected.classifier}</protocArtifact>
  46. <protocPlugins>
  47. <protocPlugin>
  48. <id>dubbo</id>
  49. <groupId>org.apache.dubbo</groupId>
  50. <artifactId>dubbo-compiler</artifactId>
  51. <version>${dubbo.version}</version>
  52. <mainClass>org.apache.dubbo.gen.tri.Dubbo3TripleGenerator</mainClass>
  53. <!-- <mainClass>org.apache.dubbo.gen.dubbo.Dubbo3Generator</mainClass>-->
  54. </protocPlugin>
  55. </protocPlugins>
  56. <!--默认值-->
  57. <protoSourceRoot>${project.basedir}/src/main/proto</protoSourceRoot>
  58. <!--默认值-->
  59. <outputDirectory>${project.basedir}/src/main/java</outputDirectory>
  60. <!--设置是否在生成java文件之前清空outputDirectory的文件,默认值为true,设置为false时也会覆盖同名文件-->
  61. <clearOutputDirectory>false</clearOutputDirectory>
  62. </configuration>
  63. <executions>
  64. <execution>
  65. <goals>
  66. <!--生成OuterClass类-->
  67. <goal>compile</goal>
  68. </goals>
  69. </execution>
  70. </executions>
  71. </plugin>
  72. </plugins>
  73. </build>
  74. </project>