Skip to content

Commit 2d9fe14

Browse files
authored
Merge pull request #21 from xiaohongxiedaima/add-protoSourceRoot
add protoSourceRoot config for protobuf-maven-plugin, optimize polaris-protobuf/pom.xml code comments
2 parents 42ffc9d + 9b612f0 commit 2d9fe14

File tree

1 file changed

+7
-5
lines changed
  • polaris-common/polaris-protobuf

1 file changed

+7
-5
lines changed

polaris-common/polaris-protobuf/pom.xml

+7-5
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@
2929
</dependencies>
3030

3131
<build>
32-
<!--这个是为了下载下面的工具用的,他可以提供一些变量,os.detected.classifier变量可以根据当前系统的类型来下载对应的工具-->
32+
<!--
33+
generates various useful platform-dependent project properties,
34+
eg: generates os.detected.classifier for protobuf-maven-plugin
35+
-->
3336
<extensions>
3437
<extension>
3538
<groupId>kr.motd.maven</groupId>
@@ -38,11 +41,11 @@
3841
</extension>
3942
</extensions>
4043
<plugins>
44+
<!-- protobuf compile plugin -->
4145
<plugin>
4246
<groupId>org.xolstice.maven.plugins</groupId>
4347
<artifactId>protobuf-maven-plugin</artifactId>
4448
<version>0.6.1</version>
45-
<!--添加.proto文件的编译工具-->
4649
<configuration>
4750
<protocArtifact>
4851
com.google.protobuf:protoc:3.12.0:exe:${os.detected.classifier}
@@ -51,11 +54,10 @@
5154
<pluginArtifact>
5255
io.grpc:protoc-gen-grpc-java:1.38.0:exe:${os.detected.classifier}
5356
</pluginArtifact>
54-
<!--这是生成grpc工具类存放的文件夹的名字-->
55-
<pluginId>grpc-java</pluginId>
57+
<!--The source directories containing the .proto definitions to be compiled. -->
58+
<protoSourceRoot>${basedir}/src/main/proto</protoSourceRoot>
5659
</configuration>
5760
<executions>
58-
<!--这是上面两个编译工具用到的命令-->
5961
<execution>
6062
<goals>
6163
<goal>compile</goal>

0 commit comments

Comments
 (0)