pom.xml 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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>demo-platform-service-parent</artifactId>
  9. <version>1.0.0-SNAPSHOT</version>
  10. <relativePath>../pom.xml</relativePath>
  11. </parent>
  12. <artifactId>demo-platform-service-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. </dependency>
  23. </dependencies>
  24. <build>
  25. <extensions>
  26. <extension>
  27. <groupId>kr.motd.maven</groupId>
  28. <artifactId>os-maven-plugin</artifactId>
  29. <version>1.6.2</version>
  30. </extension>
  31. </extensions>
  32. <plugins>
  33. <plugin>
  34. <groupId>org.xolstice.maven.plugins</groupId>
  35. <artifactId>protobuf-maven-plugin</artifactId>
  36. <version>0.6.1</version>
  37. <configuration>
  38. <!-- ${os.detected.classifier} m2芯片不适用 -->
  39. <protocArtifact>com.google.protobuf:protoc:3.19.4:exe:osx-x86_64</protocArtifact>
  40. <protocPlugins>
  41. <protocPlugin>
  42. <id>dubbo</id>
  43. <groupId>org.apache.dubbo</groupId>
  44. <artifactId>dubbo-compiler</artifactId>
  45. <version>${dubbo.version}</version>
  46. <mainClass>org.apache.dubbo.gen.tri.Dubbo3TripleGenerator</mainClass>
  47. <!-- <mainClass>org.apache.dubbo.gen.dubbo.Dubbo3Generator</mainClass>-->
  48. </protocPlugin>
  49. </protocPlugins>
  50. <!--默认值-->
  51. <protoSourceRoot>${project.basedir}/src/main/proto</protoSourceRoot>
  52. <!--默认值-->
  53. <outputDirectory>${project.basedir}/src/main/java</outputDirectory>
  54. <!--设置是否在生成java文件之前清空outputDirectory的文件,默认值为true,设置为false时也会覆盖同名文件-->
  55. <clearOutputDirectory>false</clearOutputDirectory>
  56. </configuration>
  57. <executions>
  58. <execution>
  59. <goals>
  60. <!--生成OuterClass类-->
  61. <goal>compile</goal>
  62. </goals>
  63. </execution>
  64. </executions>
  65. </plugin>
  66. </plugins>
  67. </build>
  68. </project>