pom.xml 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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-outpatient-parent</artifactId>
  9. <version>1.0.0-SNAPSHOT</version>
  10. <!-- <relativePath>../pom.xml</relativePath>-->
  11. </parent>
  12. <artifactId>ywt-platform-outpatient-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>${protobuf.version}</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.2</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. <!-- ${os.detected.classifier} m2芯片不适用 -->
  40. <protocArtifact>com.google.protobuf:protoc:3.19.4:exe:${os.detected.classifier}</protocArtifact>
  41. <protocPlugins>
  42. <protocPlugin>
  43. <id>dubbo</id>
  44. <groupId>org.apache.dubbo</groupId>
  45. <artifactId>dubbo-compiler</artifactId>
  46. <version>${dubbo.version}</version>
  47. <mainClass>org.apache.dubbo.gen.tri.Dubbo3TripleGenerator</mainClass>
  48. <!-- <mainClass>org.apache.dubbo.gen.dubbo.Dubbo3Generator</mainClass>-->
  49. </protocPlugin>
  50. </protocPlugins>
  51. <!--默认值-->
  52. <protoSourceRoot>src/main/proto</protoSourceRoot>
  53. <!--默认值-->
  54. <outputDirectory>src/main/java</outputDirectory>
  55. <!--设置是否在生成java文件之前清空outputDirectory的文件,默认值为true,设置为false时也会覆盖同名文件-->
  56. <clearOutputDirectory>false</clearOutputDirectory>
  57. </configuration>
  58. <executions>
  59. <execution>
  60. <goals>
  61. <!--生成OuterClass类-->
  62. <goal>compile</goal>
  63. </goals>
  64. </execution>
  65. </executions>
  66. </plugin>
  67. </plugins>
  68. </build>
  69. </project>