在《使用protobuf-maven-plugin生成grpc项目》中我们使用protobuf-maven-plugin完成了grpc代码的翻译。本文我们将只是替换pom.xml中的部分内容,使用protoc-jar-maven-plugin来完成相同的功能。总体来说protoc-jar-maven-plugin方案更加简便。 环境 见《使用protobuf-maven-plugin生成grpc项目》 ...
在《使用protobuf-maven-plugin生成grpc项目》中我们使用protobuf-maven-plugin完成了grpc代码的翻译。本文我们将只是替换pom.xml中的部分内容,使用protoc-jar-maven-plugin来完成相同的功能。总体来说protoc-jar-maven-plugin方案更加简便。 环境 见《使用protobuf-maven-plugin生成grpc项目》 准备工作 目录结构 见《...
Protocol Buffers protobuf maven plugin - performs protobuf code generation using protoc-jar multi-platform executable protoc JAR. Available on Maven Central: http://central.maven.org/maven2/com/github/os72/protoc-jar-maven-plugin/3.7.0.2/Simple...
<name>protoc-jar-maven-plugin</name> <url>https://github.com/os72/protoc-jar-maven-plugin</url> <description>Protocol Buffers codegen plugin - based on protoc-jar executable JAR</description> <parent> <groupId>org.sonatype.oss</groupId> ...
我已经添加了如下Maven配置。 <plugin> <groupId>com.github.os72</groupId> <artifactId>protoc-jar-maven-plugin</artifactId> <version>3.5.1</version> <executions> <execution> <phase>generate-sources</phase> <goals> <goal>run</goal> </goals> <configuration> <protocArtifact>com.google.proto...
如果java项目中包含proto文件,他们将跟编译的类一起打包到jar包中。可以通过compile或者protobuf来配置protos依赖。 如果通过compile配置,proto文件将会被提取到extracted-include-protos目录下,并将此目录添加到protoc命令行运行编译时--proto_path参数下,这样就可以把依赖的文件导入到当前工程下。因为导入的proto文件已经...
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-site-plugin:3.3: Plugin org.apache.maven.plugins:maven-site-plugin:3.3 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-site-plugin:jar:3.3 ...
2、Eclipse创建 Maven 项目报错:org.apache.maven.plugins:maven-resources-plugin:2.6找不到 删除 C:\Users\Administrator\.m2\repository\org\apache\maven\plugins(或者是自己配置的本地仓库目录)下的所有文件,重新下载 选择项目 -> 右键Run As -> Maven install,一般来说重新下载后不行可能是网速不好的原因。
Downloadhttps://repo1.maven.org/maven2/com/google/protobuf/protobuf-gradle-plugin/0.7.7/protobuf-gradle-plugin-0.7.7.jar *** Building codegen requires Protobuf version 3.0.0-beta-2 *** Please refer tohttps://github.com/grpc/grpc-java/blob/master/COMPILING.md#how-to-build-code-generation...
Downloadhttps://repo1.maven.org/maven2/com/google/protobuf/protobuf-gradle-plugin/0.7.7/protobuf-gradle-plugin-0.7.7.jar *** Building codegen requires Protobuf version 3.0.0-beta-2 *** Please refer tohttps://github.com/grpc/grpc-java/blob/master/COMPILING.md#how-to-build-code-generation...